How come I get address already in use from bind()?
Answer / chaitanya
You get this when the address is already in use. (Oh, you figured that much out?) The most common reason for this is that you have stopped your server, and then re-started it right away. The sockets that were used by the first incarnation of the server are still active. This is further explained in ``2.7 Please explain the TIME_WAIT state.'', and ``2.5 How do I properly close a socket?''.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is af_inet in socket?
What is active unix domain sockets?
How can I be sure that UDP messages are received in order?
Can multiple clients connect to same socket?
When will my application receive SIGPIPE?
Is a socket a file?
How would I put my socket in non-blocking mode?
What is the purpose of socket?
How can I put a timeout on connect()?
What are raw sockets?
Are sockets files?
How to find other end of unix socket connection?