June 2006
Intermediate to advanced
1344 pages
42h 52m
English
Typically, with TCP, a server “listens” (i.e., waits) for a connection request from a client. Often, the server program contains a control statement or block of code that executes continuously until the server receives a request. On receiving a request, the server establishes a connection to the client. The server then uses this connection—managed by a Socket object—to handle future requests from that client and to send data to the client. Since programs that communicate via TCP process the data they send and receive as streams of bytes, programmers sometimes refer to Sockets used with TCP as “stream Sockets.”
Establishing a simple server with TCP and stream sockets requires five steps. ...
Read now
Unlock full access