TCP and UDP

 TCP stands for “Transmission Control Protocol”.

TCP is used for encrypted communication purposes, to guarantee that all the information is correctly and reliably received in order. Without it, the data can be missing or out of order, making it useless.

TCP verifies the connection by the “three-way handshake” system.

Three-way handshake:

1) (Computer 1) Sends an SYN message.

2) (Computer 2) Reply sending an acknowledgment message telling that has received the message.

3) (Computer 1) And finally data can be delivered.

Example of TC protocol:

UDP stands for “User Datagram Protocol”

UDP is also used to send and receive data, but as TCP works by three-way handshake, UDP is connectionless oriented and, therefore, faster than TCP, this means that UDP does not establish any communication session with the receiver and does not guarantee data delivery.

When the computer sends data, it doesn’t even know if data is received at the end this is why UDP is also known as the “fire-and-forget” protocol. 

Example of UD protocol: