If bind() fails, what should I do with the socket descriptor?
Answer Posted / 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 |
Post New Answer View All Answers
How can I tell when a socket is closed on the other end?
Are sockets files?
What is sae socket?
What is a socket set used for?
Why does the sockets buffer fill up sooner than expected?
Are unix sockets faster than tcp?
How does unix socket work?
Can multiple sockets use the same port?
system choose one for me on the connect() call? Should I bind() a port number in my client program, or let the?
How do I convert a string into an internet address?
What is a socket api?
What exactly is a socket?
How many sockets can a port have?
What is socket programming in java?
How is a socket created?