Chapter 7. Connection-Oriented Protocols for Clients

You'll recall from the last chapter that there are two basic modes of communication for sockets. They are connection and connectionless modes of communication. In the last chapter, you also saw how the UDP protocol could be used to communicate in a connectionless fashion. In this chapter, you'll put the TCP/IP protocol to use, using a connection-oriented form of communication.

This chapter will introduce you to

  • The advantages of connection-oriented protocols

  • The /etc/services file and its support routines

  • The /etc/protocols file and its support routines

  • The connect(2) function

  • How to write a TCP/IP client program

Before you jump in and write your first client program, however, a quick review and an ...

Get Linux Socket Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.