O'Reilly logo

Linux Socket Programming by Example by Warren W. Gay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Connection-Oriented Protocols for Servers

The last chapter showed you how to write a connection-oriented client program. The server program that the client connects to must use a different procedure, however. This chapter will teach you about the role of the server, including the following topics:

  • The basic steps used by connection-oriented servers

  • Why the bind(2) function is necessary for servers

  • The listen(2) function and its role

  • The accept(2) function and its role

  • How to write a connection-oriented server program

With these topics mastered, you will be equipped to program your own custom server programs.

Understanding the Role of the Server

In the last chapter you saw how a client program connected to a server process. Compared to connectionless ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required