I wrote a simple tcp client and server and started them. I notice that when I use the ctrl+ctcp connection to close the program, the tcp connection state is similar TIME_WAIT
if I started the client again and the tcp server the tcp connection cannot be established again a RSTthe packet is always sent by the tcp server I need to wait a while until the next tcp connection is established.
what is the reason for this and how to deal with this problem?
In addition, I notice on one host that the tcp connection is in a state FIN_WAIT_2
even if it does not receive FIN, the tcp connection will be closed after a while Why?
thank
source
share