fa26-cs759 cs759
Chapter 11: Network Programming Chapter 11: Network Programming
Content locked
The catalog is public. Reading this content requires approved access.
Sign in to readChapter 11: Network Programming
Network Programming
11.1 The Client-Server Programming Model
Aside Client-server transactions versus database transactions
11.2 Networks
Aside Internet versus internet
11.3 The Global IP Internet
Aside IPv4 and IPv6
11.3.1 IP Addresses
Practice Problem 11.1 (solution page 1002)
Practice Problem 11.2 (solution page 1003)
Practice Problem 11.3 (solution page 1003)
11.3.2 Internet Domain Names
11.3.3 Internet Connections
Aside How many Internet hosts are there?
Aside Origins of the Internet
Aside Origins of the sockets interface
11.4 The Sockets Interface
11.4.1 Socket Address Structures
11.4.2 The socket Function
11.4.3 The connect Function
11.4.4 The bind Function
11.4.5 The listen Function
11.4.6 The accept Function
Aside Why the distinction between listening and connected descriptors?
11.4.7 Host and Service Conversion
The getaddrinfo Function
The getnameinfo Function
Practice Problem 11.4 (solution page 1004)
11.4.8 Helper Functions for the Sockets Interface
The open_clientfd Function
The open_listenfd Function
11.4.9 Example Echo Client and Server
Aside What does EOF on a connection mean?
11.5 Web Servers
11.5.1 Web Basics
Aside Origins of the World Wide Web
11.5.2 Web Content
11.5.3 HTTP Transactions
HTTP Requests
method URI version
header-name: header-data
HTTP Responses
version status-code status-message
Aside Passing arguments in HTTP POST requests
11.5.4 Serving Dynamic Content
How Does the Client Pass Program Arguments to the Server?
How Does the Server Pass Arguments to the Child?
How Does the Server Pass Other Information to the Child?
Where Does the Child Send Its Output?
Practice Problem 11.5 (solution page 1005)
Aside Passing arguments in HTTP POST requests to CGI programs
11.6 Putting It Together: The TINY Web Server
The TINY main Routine
The doit Function
The clienterror Function
The read_requesthdrs Function
The parse_uri Function
The serve_static Function
The serve_dynamic Function
Aside Dealing with prematurely closed connections
11.7 Summary
Bibliographic Notes
Homework Problems
11.6
11.7 ◆◆
11.8 ◆◆
11.9 ◆◆
11.10 ◆◆
11.11 ◆◆
11.12 ◆◆◆
11.13 ◆◆◆
Solutions to Practice Problems
Solution to Problem 11.4 (page 978)
Solution to Problem 11.5 (page 990)
Source footnotes