A TCP Client-Server Program

In the last chapter, we studied TCP theory in detail. Now, we'll look at how we can code up TCP programs in Python.

We'll cover the following...

Introduction

There are a few key points to be noted about TCP programs:

  • TCP connect() calls induce full TCP three-way handshakes! As we saw in the last chapter, three-way handshakes can fail and so can connect() calls.

  • A new socket gets created for every new connection in a TCP architecture.

  • One socket on TCP servers is dedicated to continuously listen for ...