Product Information
In this book, the authors offer unprecedented, start-to-finish guidance on making the most of sockets, the de facto standard for UNIX network programming. The authors begin by introducing virtually every basic capability of TCP and UDP sockets, including socket functions and options, I/O multiplexing, and name and address conversions. They present detailed coverage of the Posix.1g standard for sockets and the Posix threads. They also introduce advanced techniques for: establishing IPv4/IPv6 interoperability, implementing non-blocking I/O, routing sockets, broadcasting and multicasting, IP options, multithreading, advanced name and address conversions, UNIX domain protocols, and raw sockets. Teaches students how to choose among today's leading client/server design approaches, including TCP iterative, concurrent, preforked and prethreaded servers. The Internet/intranet revolution has dramatically increased the demand for students graduating with a sophisticated understanding of network programming APIs, especially sockets. This book helps students achieve that goal.Product Identifiers
PublisherAddison Wesley Professional
ISBN-100131411551
ISBN-139780131411555
eBay Product ID (ePID)5907235
Product Key Features
Number of Pages1024 Pages
Publication NameUnix Network Programming : the Sockets Networking Api
LanguageEnglish
SubjectOperating Systems / Unix, Web / Web Programming, Networking / General
Publication Year2003
TypeTextbook
AuthorW. Richard Stevens, Bill Fenner, Andrew M. Rudoff, Richard W. Stevens
Subject AreaComputers
SeriesAddison-Wesley Professional Computing Ser.
FormatHardcover
Dimensions
Item Height1.5 in
Item Weight57.6 Oz
Item Length9.5 in
Item Width7.4 in
Additional Product Features
Edition Number3
Target AudienceScholarly & Professional
IllustratedYes
Edition DescriptionRevised Edition
Table of ContentForeword. Preface. I. INTRODUCTION AND TCP/IP. 1. Introduction. Introduction. A Simple Daytime Client. Protocol Independence. Error Handling: Wrapper Functions. A Simple Daytime Server. Roadmap to Client/Server Examples in the Text. OSI Model. BSD Networking History. Test Networks and Hosts. Unix Standards. 64-Bit Architectures. Summary. 2. The Transport Layer: TCP, UDP, and SCTP. Introduction. The Big Picture. User Datagram Protocol (UDP). Transmission Control Protocol (TCP). Stream Control Transmission Protocol (SCTP). TCP Connection Establishment and Termination. TIME_WAIT State. SCTP Association Establishment and Termination. Port Numbers. TCP Port Numbers and Concurrent Servers. Buffer Sizes and Limitations. Standard Internet Services. Protocol Usage by Common Internet Applications. Summary. II. ELEMENTARY SOCKETS. 3. Sockets Introduction. Introduction. Socket Address Structures. Value-Result Arguments. Byte Ordering Functions. Byte Manipulation Functions. inet_aton, inet_addr, and inet_ntoa Functions. inet_pton and inet_ntop Functions. sock_ntop and Related Functions. readn, writen, and readline Functions. Summary. 4. Elementary TCP Sockets. Introduction. socket Function. connect Function. bind Function. listen Function. accept Function. fork and exec Functions. Concurrent Servers. close Function. getsockname and getpeername Functions. Summary. 5. TCP Client/Server Example. Introduction. TCP Echo Server: main Function. TCP Echo Server: str_echo Function. TCP Echo Client: main Function. TCP Echo Client: str_cli Function. Normal Startup. Normal Termination. POSIX Signal Handling. Handling SIGCHLD Signals. wait and waitpid Functions. Connection Abort before accept Returns. Termination of Server Process. SIGPIPE Signal. Crashing of Server Host. Crashing and Rebooting of Server Host. Shutdown of Server Host. Summary of TCP Example. Data Format. Summary. 6. I/O Multiplexing: The select and poll Functions. Introduction. I/O Models. select Function. str_cli Function (Revisited). Batch Input and Buffering. shutdown Function. str_cli Function (Revisited Again). TCP Echo Server (Revisited). pselect Function. poll Function. TCP Echo Server (Revisited Again). Summary. 7. Socket Options. Introduction. getsockopt and setsockopt Functions. Checking if an Option Is Supported and Obtaining the Default. Socket States. Generic Socket Options. IPv4 Socket Options. ICMPv6 Socket Option. IPv6 Socket Options. TCP Socket Options. SCTP Socket Options. fcntl Function. Summary. 8. Elementary UDP Sockets. Introduction. recvfrom and sendto Functions. UDP Echo Server: main Function. UDP Echo Server: dg_echo Function. UDP Echo Client: main Function. UDP Echo Client: dg_cli Function. Lost Datagrams. Verifying Received Response. Server Not Running. Summary of UDP Example. connect Function with UDP. dg_cli Function (Revisited). Lack of Flow Control with UDP. Determining Outgoing Interface with UDP. TCP and UDP Echo Server Using select. Summary. 9. Elementary SCTP Sockets. Introduction. Interface Models. sctp_bindx Function. sctp_connectx Function. sctp_getpaddrs Function. sctp_freepaddrs Function. sctp_getladdrs Function. sctp_freeladdrs Function. sctp_sendmsg Function. sctp_recvmsg Function. sctp_opt_info Function. sctp_peeloff Function. shutdown Function. Notifications. Summary. 10. SCTP Client/Server Example. Introduction. SCTP One-to-Many-Style Streaming Echo Server: main Function. SCTP One-to-Many-Style Streaming Echo Client: main Function. SCTP Streaming Echo Client: str_cli Function. Exploring Head-of-Line Blocking. Controlling the Number of Streams. Controlling Termination. Summary. 11. Name and Address Conversions. Introduction. Domain Name System (DNS). gethostbyname Function. gethostbyaddr Function. getservbyname and getservbyport Functions. getaddrinfo Function. gai_strerror Function. freeaddrinfo Function. getaddrinfo Function: IPv6. getaddrinfo Function: Example