TCP TIME_WAIT State

Why does a TCP connection remain in TIME_WAIT state for typically 2×MSL (Maximum Segment Lifetime) after closing?

A

To flush remaining data from buffers

B

To allow retransmission of the final ACK if lost

C

To prevent port number exhaustion

D

To give the server time to close the socket