HTTP
Hypertext Transfer Protocol version is a protocol for transmitting data over the internet. It is the standard protocol used for web communication.
When a client initiates a connection to a server using HTTP over TCP, the two endpoints first establish a connection through a three-way handshake
. The three-way handshake is a method used by TCP to establish a reliable connection between two endpoints.
Here's how the three-way handshake works:
- The client sends a
SYN
(synchronize) message to the server to initiate a connection. This message includes a randomly generated sequence number that is used to identify the connection. - The server receives the SYN message and sends a
SYN-ACK
(synchronize-acknowledge) message back to the client. This message includes an acknowledgement number that is set to one more than the sequence number received from the client, as well as a randomly generated sequence number of its own. - The client receives the SYN-ACK message and sends an
ACK
(acknowledge) message back to the server. This message includes the acknowledgement number that is set to one more than the sequence number received from the server.