How do I properly close a socket?
Answer / chaitanya
This question is usually asked by people who try close(), because they have seen that that is what they are supposed to do, and then run netstat and see that their socket is still active. Yes, close() is the correct method. To read about the TIME_WAIT state, and why it is important, refer to ``2.7 Please explain the TIME_WAIT state.''.
Is This Answer Correct ? | 0 Yes | 0 No |
How to find other end of unix socket connection?
How many socket connections can a server handle?
Why does the sockets buffer fill up sooner than expected?
What exactly does SO_KEEPALIVE do?
How do I properly close a socket?
Are sockets files?
How do Sockets Work?
How do unix sockets work?
Why do we need socket programming?
When should I use UDP instead of TCP?
How do I send [this] over a socket?
Why sockets are used?