The Linux Programming Interface
Sockets: Internet Domains 1237 data structure pointed to by rlbuf. This structure includes space for a data buffer, the size of ...
...
Chapter 60: Sockets: Server Design This chapter discusses the fundamentals of designing iterative and concurrent servers and des ...
1240 Chapter 60 Concurrent servers are suitable when a significant amount of processing time is required to handle each request, ...
Sockets: Server Design 1241 Listing 60-2: An iterative server that implements the UDP echo service ––––––––––––––––––––––––––––– ...
1242 Chapter 60 Listing 60-3: A client for the UDP echo service ––––––––––––––––––––––––––––––––––––––––––––––––––––– sockets/id ...
Sockets: Server Design 1243 60.3 A Concurrent TCP echo Server The TCP echo service also operates on port 7. The TCP echo server ...
1244 Chapter 60 Listing 60-4: A concurrent server that implements the TCP echo service ––––––––––––––––––––––––––––––––––––––––– ...
Sockets: Server Design 1245 sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART; sa.sa_handler = grimReaper; if (sigaction(SI ...
1246 Chapter 60 Preforked and prethreaded servers Preforked and prethreaded servers are described in some detail in Chapter 30 o ...
Sockets: Server Design 1247 to ensure that one or a few clients don’t monopolize access to the server while other clients are st ...
1248 Chapter 60 The inetd daemon is designed to eliminate the need to run large numbers of infrequently used servers. Using inet ...
Sockets: Server Design 1249 The /etc/inetd.conf file The operation of the inetd daemon is controlled by a configuration file, no ...
1250 Chapter 60 In the example lines shown in Listing 60-5 for the ftp, telnet, and login services, we see the server program an ...
Sockets: Server Design 1251 Create a new process to handle the incoming UDP datagram or TCP connec- tion. The process is automa ...
1252 Chapter 60 60.6 Summary An iterative server handles one client at a time, processing that client’s request(s) completely, b ...
SOCKETS: ADVANCED TOPICS This chapter considers a range of more advanced topics relating to sockets pro- gramming, including the ...
1254 Chapter 61 61.1 Partial Reads and Writes on Stream Sockets When we first introduced the read() and write() system calls in ...
Sockets: Advanced Topics 1255 Listing 61-1: Implementation of readn() and writen() ––––––––––––––––––––––––––––––––––––––––––––– ...
1256 Chapter 61 61.2 The shutdown() System Call Calling close() on a socket closes both halves of the bidirectional communicatio ...
«
60
61
62
63
64
65
66
67
68
69
»
Free download pdf