What is TCP

TCP is a protocol of the internet. It ensures the safe transfer of information between clients and servers.

TCP is a bidirectional process, which means that a connection between A and B can facilitate data transfers from A to B and also B to A.

This is established with what is known as the syn-syn/ack-ack process, called a three way handshake.

First the application A sends a sync requenst to B. B then acknowledges the request (ack) and requests a sync to A which then sends the final acknowledgement (ack).

TCP is unique in that the order that information is received is checked. If something doesn’t come in the correct position, or doesn’t arrive at all, the TCP protocol will wait until all the information has arrived in the correct order.

TCP sends data in segments. Each segment has a maximum segment size which defines how much data can be in each segment. Each segment has a header, and various other information that defines aspects of that segment.

An example can be seen below1.

TCP is used for the following protocols

  • http
  • https
  • ftp (file transfer)
  • smtp (email)

  1. Kurose, J.F. and Ross, K.W., Computer networking: A top-down approach (pp. 607967-5). Addison Wesley. ↩︎