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 do unix sockets work?
What is the difference between SO_REUSEADDR and SO_REUSEPORT?
What is difference between socket () and serversocket () class?
How often should I re-transmit un-acknowleged messages?
Why do I get connection refused when the server is not running?
What is with the second parameter in bind()?
How can I be sure that UDP messages are received in order?
Why does it take so long to detect that the peer died?
When will my application receive SIGPIPE?
How do I send [this] over a socket?
What is a socket address?
What's the difference between a socket and a port?