The exact meaning of the backlog argument requires an

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: s, cliport is the client’s port, servaddr is the server’s IP address, and servport is the server’s port. For example, Figure 12.13 shows a connection between a Web client and a Web server. In this example, the Web client’s socket address is 12.4. UNIX FILE I/O client socket address 128.2.194.242:51213 server socket address 208.216.181.15:80 619 client connection socket pair (128.2.194.242 :51213, 208.216.181.15:80) server (port 80) server host address 208.216.181.15 client host address 128.2.194.242 Figure 12.13: Anatomy of an Internet connection 128.2.194.242:51213 where port 51213 is an ephemeral port assigned by the kernel. The Web server’s socket address is 208.216.181.15:80 where port 80 is the well-known port associated with Web services. Given these client and server socket addresses, the connection between the client and server is uniquely identified by the socket pair (128.2.194.242:51213, 1208.216.181.15:80). In Section 12.5 we will learn how C programs use the sockets interface to establish connections between clients and servers. But since sockets are modeled in Unix as files, we must...
View Full Document

Ask a homework question - tutors are online