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 are socket exceptions? What is out-of-band data?
What is a deep well socket?
Why do I get connection refused when the server is not running?
What is af_inet in socket?
How can I listen on more than one port at a time?
of the socket? Does doing a connect() call affect the receive behaviour?
over the socket? Is there a way to have a dynamic buffer? What does one do when one does not know how much information is coming?
What is the difference between close() and shutdown()?
What is the difference between a socket and a port?
How do I convert a string into an internet address?
What is socket programming in java?
How can I set the timeout for the connect() system call?