TCP or Transmission Control Protocol - mwilkin-401-advanced-javascript/bend-javascript-401d2 GitHub Wiki

TCP or Transfer Control Protocol controls the transfer of data in a reliable manner. It is a standard that define how to establish and maintain a network connection. The network connection between devices is maintained until data is finished being exchanged.

The following requirements must be met: • All data packets must reach the destination; no packet loss. • No delay in transmission such that data quality is unaffected. • All data packets are reassembled in order.

The TCP manages how to break apart the data that is being transmitted into packets that can be delivered over the network and send and receives those packets from the network layer. It gives each packet a number to help with reassembly and a deadline to reach the destination. A notification is sent to the sender, for each data packet received. If there is a missing notification or the transmission deadline is exceeded for a data packet, another copy of that packet is sent. The packets are then reassembled in order which ensures proper reconstruction of the payload.

TCP does not have an addressing system. It only uses numbers provided by the device it is working on to identify where it is receiving and sending packets for which service. These numbers are call ports. For example, web browsers use port 80, email uses port 25.

In the Open Systems Interconnection communication model, TCP covers parts of Layer 4 and Layer 5, or the Transport Layer and the Session Layer.