Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

57. Sockets: UNIX Domain > Stream Sockets in the UNIX Domain

Stream Sockets in the UNIX Domain

We now present a simple client-server application that uses stream sockets in the UNIX domain. The client program (Example 57-4) connects to the server, and uses the connection to transfer data from its standard input to the server. The server program (Example 57-3) accepts client connections, and transfers all data sent on the connection by the client to standard output. The server is a simple example of an iterative server—a server that handles one client at a time before proceeding to the next client. (We consider server design in more detail in Chapter 60.)

Example 57-2 is the header file used by both of these programs.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint