TH10-11 Server Design: Process Structures

Iterative TCP Server

A server process creates its socket (master socket) and sets it up with its endpoint address and requested service. This socket is used ONLY to connect a new client. The server repeatedly issues accept(). The accept() blocks resources (i.e. the OS does NOT waste resources to the Server) until a connect() from a new client arrives. Then the server creates a new socket (slave socket) to be used by this client.

Iterative UDP Server

A server process creates its socket and sets it up with its endpoint address and requested service. The same single passive socket is used BOTH for connection purposes AND for transmitting data with the client. The server obtains a request from the client and sends a reply back using the same socket. Since NO connect() can be used the Server has to use recvto() call which extracts client’s endpoint address from the datagram.

Welcome to Kaizenlog.com If you're new here, you may want to subscribe to my RSS feed , Twitter You can contact us by using the contact form or submitting a comment. You can also share this post with your friends by clicking on the 'ShareThis' button above. Thanks for visiting!



Print This Post Print This Post





  • Related Posts



  • Leave a Reply