How come I get address already in use from bind()?



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

Post New Answer

More Unix Socket Programming Interview Questions

What exactly is a socket?

0 Answers  


What is af_inet in socket?

0 Answers  


What is socket programming in java?

0 Answers  


How should I choose a port number for my server?

1 Answers  


When should I use shutdown()?

1 Answers   Wipro,






What are socket exceptions? What is out-of-band data?

1 Answers  


What does af mean in sockets?

0 Answers  


How come I get address already in use from bind()?

1 Answers  


How do Sockets Work?

1 Answers  


What is sae socket?

0 Answers  


How can I write a multi-homed server?

0 Answers  


Is socket a hardware or software?

0 Answers  


Categories