Introduction to the TCP and UDP protocols

The properties of a socket depend on the characteristics of the protocol in which they are implemented. Generally, communication with sockets is done through a protocol of the TCP/IP family. The two most common are TCP and UDP.

When implemented with the TCP protocol, the sockets have the following properties:

The UDP protocolĀ hasĀ the following properties:

Sockets can be implemented through a different number of channels: Unix domain sockets, TCP, and UDP. The Python socket library provides specific classes to handle common transport, as well as a generic interface to control everything else.