Sobes.tech
Middle

Kuidas toimub TCP kättesaamine?

sobes.tech AI

Vastus AI-lt

TCP handshake is the process of establishing a connection between a client and a server using the TCP protocol. It consists of three steps (3-way handshake):

  1. SYN: The client sends a segment with the SYN flag to the server to initiate the connection and specify the initial sequence number.
  2. SYN-ACK: The server responds with a segment with SYN and ACK flags, acknowledging receipt of SYN and sending its own initial sequence number.
  3. ACK: The client sends a segment with the ACK flag, confirming receipt of SYN-ACK.

After this, the connection is considered established, and data can be exchanged.

Example:

  • Client → Server: SYN seq=100
  • Server → Client: SYN seq=300, ACK ack=101
  • Client → Server: ACK ack=301

This mechanism ensures the synchronization of sequence numbers and readiness of both parties to transmit data.