Suppose we have established TCP connection. The active close process assumes the FIN packet been sent to trigger TCP connection closing.
But I can't figure out, is this first (active close) FIN packet has only FIN bit set? Or there can be ACK bit or even PSH with some data payload?
Thanks in advance, sorry if obvious.
1 Answer
A segment (not packet) with the FIN flag set will almost always have the ACK flag set too, and it can also contain data in its payload. What the FIN flag says is that it is now done sending. It can and must still listen to anything else the other side is willing to send, and it must also resend anything that the other side did not receive, but it is done sending new data.