Limit search to available items
364 results found. sorted by date .
Book Cover
E-book
Author Van Winkle, Lewis.

Title Hands-On Network Programming with C : Learn Socket Programming in C and Write Secure and Optimized Network Code / Lewis Van Winkle
Published Birmingham : Packt Publishing, Limited, 2019

Copies

Description 1 online resource (467 pages)
Contents Cover; Title Page; Copyright and Credits; Dedication; About Packt; Contributors; Table of Contents; Preface; Section 1 -- Getting Started with Network Programming; Chapter 1: Introducing Networks and Protocols; Technical requirements; The internet and C; OSI layer model; TCP/IP layer model; Data encapsulation; Internet Protocol; What is an address?; Domain names; Internet routing; Local networks and address translation; Subnetting and CIDR; Multicast, broadcast, and anycast; Port numbers; Clients and servers; Putting it together; What's your address?; Listing network adapters from C
Listing network adapters on WindowsListing network adapters on Linux and macOS; Summary; Questions; Chapter 2: Getting to Grips with Socket APIs; Technical requirements; What are sockets?; Socket setup; Two types of sockets; Socket functions; Anatomy of a socket program; TCP program flow; UDP program flow; Berkeley sockets versus Winsock sockets; Header files; Socket data type; Invalid sockets; Closing sockets; Error handling; Our first program; A motivating example; Making it networked; Working with IPv6; Supporting both IPv4 and IPv6; Networking with inetd; Summary; Questions
Chapter 3: An In-Depth Overview of TCP ConnectionsTechnical requirements; Multiplexing TCP connections; Polling non-blocking sockets; Forking and multithreading; The select() function; Synchronous multiplexing with select(); select() timeout; Iterating through an fd_set; select() on non-sockets; A TCP client; TCP client code; A TCP server; TCP server code; Building a chat room; Blocking on send(); TCP is a stream protocol; Summary; Questions; Chapter 4: Establishing UDP Connections; Technical requirements; How UDP sockets differ; UDP client methods; UDP server methods
A first UDP client/serverA simple UDP server; A simple UDP client; A UDP server; Summary; Questions; Chapter 5: Hostname Resolution and DNS; Technical requirements; How hostname resolution works; DNS record types; DNS security; Name/address translation functions; Using getaddrinfo(); Using getnameinfo(); Alternative functions; IP lookup example program; The DNS protocol; DNS message format; DNS message header format; Question format; Answer format; Endianness; A simple DNS query; A DNS query program; Printing a DNS message name; Printing a DNS message; Sending the query; Summary; Questions
Further readingSection 2 -- An Overview of Application Layer Protocols; Chapter 6: Building a Simple Web Client; Technical requirements; The HTTP protocol; HTTP request types; HTTP request format; HTTP response format; HTTP response codes; Response body length; What's in a URL; Parsing a URL; Implementing a web client; HTTP POST requests; Encoding form data; File uploads; Summary; Questions; Further reading; Chapter 7: Building a Simple Web Server; Technical requirements; The HTTP server; The server architecture; Content types; Returning Content-Type from a filename; Creating the server socket
Summary Network programming, a challenging topic in C, is made understandable through careful exposition of socket programming APIs. Keeping up with the current trends, you will gain an insight into web programming for IoT. Finally, you will learn how to monitor the network, troubleshoot problems, implement security, and understand best practices
Notes Multiple connections buffering
Print version record
Subject C (Computer program language)
Application program interfaces (Computer software)
Computer networks.
APIs (interfaces)
Computer networking & communications.
Programming & scripting languages: general.
Computers -- Networking -- General.
Computers -- System Administration -- Linux & UNIX Administration.
Computers -- Programming Languages -- C.
Application program interfaces (Computer software)
C (Computer program language)
Computer networks
Form Electronic book
ISBN 1789344085
9781789344080