The Linux Programming Interface
Sockets: Introduction 1157 Figure 56-2: A pending socket connection The kernel must record some information about each pending c ...
1158 Chapter 56 The key point to understand about accept() is that it creates a new socket, and it is this new socket that is co ...
Sockets: Introduction 1159 56.5.4 I/O on Stream Sockets A pair of connected stream sockets provides a bidirectional communicatio ...
1160 Chapter 56 In order to allow another application to send it datagrams (letters), an applica- tion uses bind() to bind its ...
Sockets: Introduction 1161 The return value and the first three arguments to these system calls are the same as for read() and w ...
1162 Chapter 56 56.6.2 Using connect() with Datagram Sockets Even though datagram sockets are connectionless, the connect() syst ...
Sockets: Introduction 1163 A typical stream socket server creates its socket using socket(), and then binds the socket to a well ...
...
Chapter 57: Sockets: UNIX Domain This chapter looks at the use of UNIX domain sockets, which allow communication between process ...
1166 Chapter 57 In order to bind a UNIX domain socket to an address, we initialize a sockaddr_un structure, and then pass a (cas ...
Sockets: UNIX Domain 1167 z It is usual to bind a socket to an absolute pathname, so that the socket resides at a fixed address ...
1168 Chapter 57 Listing 57-3: A simple UNIX domain stream socket server –––––––––––––––––––––––––––––––––––––––––––––––––––––– s ...
Sockets: UNIX Domain 1169 if (close(cfd) == -1) errMsg("close"); } } –––––––––––––––––––––––––––––––––––––––––––––––––––––– sock ...
1170 Chapter 57 z Construct an address structure for the server’s socket, bind the socket to that address, and mark the socket a ...
Sockets: UNIX Domain 1171 57.3 Datagram Sockets in the UNIX Domain In the generic description of datagram sockets that we provid ...
1172 Chapter 57 Listing 57-6: A simple UNIX domain datagram server –––––––––––––––––––––––––––––––––––––––––––––––––––––sockets/ ...
Sockets: UNIX Domain 1173 Listing 57-7: A simple UNIX domain datagram client ––––––––––––––––––––––––––––––––––––––––––––––––––– ...
1174 Chapter 57 The following shell session log demonstrates the use of the server and client programs: $ ./ud_ucase_sv & [1 ...
Sockets: UNIX Domain 1175 This socketpair() system call can be used only in the UNIX domain; that is, domain must be specified a ...
1176 Chapter 57 To create an abstract binding, we specify the first byte of the sun_path field as a null byte (\0). This disting ...
«
56
57
58
59
60
61
62
63
64
65
»
Free download pdf