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 a socket api?
Can a socket have multiple ports?
How can I set the timeout for the connect() system call?
What are the pros/cons of select(), non-blocking I/O and SIGIO?
Can multiple sockets use the same port?
What is difference between socket () and serversocket () class?
How can I force a socket to send the data in its buffer?
What is active unix domain sockets?
What is af_inet in socket?
What does af mean in sockets?
How can I write a multi-homed server?
What is a sae socket?
What is socket address?
Are sockets files?
What is the purpose of socket?