How TCP starts and close session?
Contents
Three-way handshake to start a session
Four-way handshake to close a session
Why termination need four-way?
The four-way is actually two pairs of two-way handshakes.
Of course the step 2 and 3 can merge technically like starting session, but not flexible enough as not atomic.
The client request to disconnect its channel does not mean to disconnect the server’s channel.