Chapter 4

Socket Programming

The learning goals for this chapter are as follows:

  • Understand the meaning and importance of a Socket
  • Obtain an overview of TCP socket programming and the manner in which it is employed
  • Explore single-thread TCP socket programming in detail including the TCP client and server sockets and the streams they create
  • Understand the use of multi-thread TCP socket programming
  • Examine UDP socket programming in detail and contrast it with TCP socket programming
  • Understand the use of multi-thread UDP socket programming
  • Explore the various facets of IPv6 socket programming

4.1 Motivation

When facilities for InterProcess Communication (IPC) and networking were added to UNIX, the approach was to make the application programming ...

Get Introduction to Computer Networks and Cybersecurity 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.