0

I use TCP in C language under Windows to connect locally to the server and client. The server uses port 8888, and the client connects to the server using a fixed port of 50000. The server then actively disconnects. I found that the 8888 port on the server corresponds to the 50000 port on the external client in TIME_WAIT status. Reasonably, if I reconnect now without changing the port number, the bind will fail, but I have successfully connected and my SO_REUSEADDR value is FALSE. Why?

The information I obtained from "TCP/IP Network Programming" is that a 5-tuple connection on the server cannot be reconnected in the TIME_WAIT state, but my experiment shows that it can be reconnected directly. Please provide me with the reason.

0 Answers0