TCP

we use it in sensitive connection because it use three way handshake

UDP

we use it when we need fast and the accurse is not important

three way handshake

At first, the client sends to the server:

Then the server replies with:

Then the client responds to the server with: