Transmission Control Protocol (TCP)

If we are looking for a more reliable data transfer, we will have to employ the Transmission Control Protocol (TCP) protocol. It is also known as TCP/IP due to its usage of IP addresses and the eponymous underlying lower-level protocol.

TCP uses a networking concept known as connection, meaning a contract between two endpoints in which that data will be sent between them using some contextual data describing the current state of the connection. This is put to use in TCP to maintain counters for the sent and received packets on both ends of the connection. There are several aspects to the TCP protocol, such as the following:

This describes the basic mechanism of TCP, however the real implementation contains many more features and optimizations. We will describe them shortly when we discuss TCP's performance later in this chapter.