3 ms·
The handshake sequence is exaggerated. It's just usually 3 messages. The 3 initial messages establish a connection. A: I would like to tell you something.
by 29athrowaway 4y ago
The handshake sequence is exaggerated. It's just usually 3 messages.
The 3 initial messages establish a connection.
A: I would like to tell you something. (SYN)
B: I acknowledge you want to tell me something. (SYN-ACK)
A: I received your acknowledgement. (ACK)
After the handshake sequence is done, data transfer begins.
Only then, it is possible to know that the "something" was a joke.
If B answers with RST instead of SYN-ACK the connection is refused. If B doesn't answer, A will interpret this as a connection timeout.
- Dylan16807 4y agoNot even "after", you'd generally put the message in the same packet as the second ACK.
- ajross 4y agoOnly with specialized client software. The connect() system call doesn't return to the caller until the three-way handshake is complete, so you need a fourth packet to send useful data to the server socket. In the other direction, where you have datacenter hardware and custom kernels, it's common to see the stack cheat and start blasting packets back to the client as soon as it gets the initial SYN, just expecting that the ACK will arrive normally.
- Dylan16807 4y agoWell, even if you wait for the kernel that's only microseconds before you can go from ACK to data. No round trips necessary.
- wiredone 4y agoYou're missing the frame size comms that then occur following this.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]