Tcp Connection Termination
Connection Termination: The Four-Way Handshake
When it’s time to gracefully close the connection, the process involves a series of steps that do include the FIN flag:
FIN from Initiator: One endpoint sends a segment with the FIN (finish) flag set to indicate that it has finished sending data. This signals that it wants to close its side of the connection.
ACK for FIN: The receiving endpoint responds with an ACK to confirm that it received the FIN.
FIN from Receiver: Later (typically when it is ready to close its own side), the receiver sends its own FIN to signal that it is also finished sending data.
ACK for FIN: The original sender then responds with an ACK to acknowledge the receiver’s FIN, completing the connection termination.