How can I read ICMP errors from connected UDP sockets?
Answer / chaitanya
If the target machine discards the message because there is no process reading on the requested port number, it sends an ICMP message to your machine which will cause the next system call on the socket to return ECONNREFUSED. Since delivery of ICMP messages is not guarenteed you may not recieve this notification on the first transaction.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between connected and unconnected sockets?
If bind() fails, what should I do with the socket descriptor?
What pieces of information make up a socket?
Why do not my sockets close?
After the chroot(), calls to socket() are failing. Why?
Why does it take so long to detect that the peer died?
What is difference between socket and websocket?
How do I get the port number for a given service?
How can my client work through a firewall/proxy server?
How come I get address already in use from bind()?
Explain the TIME_WAIT state.
Where can a get a library for programming sockets?