If bind() fails, what should I do with the socket descriptor?
Answer / chaitanya
If you are exiting, I have been assured by Andrew that all unixes will close open file descriptors on exit. If you are not exiting though, you can just close it with a regular close() call.
| Is This Answer Correct ? | 1 Yes | 0 No |
How come I get address already in use from bind()?
How come select says there is data, but read returns zero?
What is socket programming in java?
Why do we need sockets?
system choose one for me on the connect() call? Should I bind() a port number in my client program, or let the?
What is the purpose of socket?
Why does it take so long to detect that the peer died?
What is socket address?
How can I tell when a socket is closed on the other end?
What are socket exceptions? What is out-of-band data?
What is difference between socket and websocket?
How should I choose a port number for my server?