Answer Posted / 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 |
Post New Answer View All Answers
What is the purpose of socket?
What are the pros/cons of select(), non-blocking I/O and SIGIO?
What is the function of socket?
What is af_inet in socket?
What are the types of sockets?
What is the difference between SO_REUSEADDR and SO_REUSEPORT?
Why do I get EPROTO from read()?
Are sockets files?
What is active unix domain sockets?
What's the difference between impact sockets and regular sockets?
Can a socket have multiple ports?
Can multiple sockets use the same port?
What is a deep well socket?
What's better 6pt or 12pt sockets?
What is sae socket?