Why do not my sockets close?
Answer / chaitanya
When you issue the close() system call, you are closing your interface to the socket, not the socket itself. It is up to the kernel to close the socket. Sometimes, for really technical reasons, the socket is kept alive for a few minutes after you close it. It is normal, for example for the socket to go into a TIME_WAIT state, on the server side, for a few minutes. People have reported ranges from 20 seconds to 4 minutes to me. The official standard says that it should be 4 minutes. On my Linux system it is about 2 minutes. This is explained in great detail in ``2.7 Please explain the TIME_WAIT state.''.
Is This Answer Correct ? | 0 Yes | 0 No |
How do I send [this] over a socket?
What are raw sockets?
How many socket connections can a server handle?
Why sockets are used?
How often should I re-transmit un-acknowleged messages?
What is active unix domain sockets?
What is a deep well socket?
How would I put my socket in non-blocking mode?
What is the difference between a socket and a port?
Why do I keep getting EINTR from the socket calls?
What's the difference between impact sockets and regular sockets?
How many sockets can a cpu have?