Multiple proxies can exist between a client and 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: a connected descriptor that can be used to communicate with the client using Unix I/O functions. The distinction between a listening descriptor and a connected descriptor can be confusing when we first encounter the accept function. The listening descriptor serves as an endpoint for client connection requests. It is typically created once and exists for the lifetime of the server. The connected descriptor is the endpoint of the connection that is established between the client and the server. It is created each time the server accepts a connection request and exists only as long as it takes the server to service a client. Figure 12.26 outlines the roles of the listening and connected descriptors. In Step 1, the server calls accept, which waits for a connection request to arrive on the listening descriptor, which for concreteness we will assume is descriptor 3 (recall that descriptors 0–2 are reserved for the standard files). listenfd(3) client clientfd connection request client clientfd server 1. Se...
View Full Document

Ask a homework question - tutors are online