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 |
How do I properly close a socket?
What is socket address?
How do unix sockets work?
What is difference between socket and websocket?
What is a socket set used for?
How can my client work through a firewall/proxy server?
Whats the difference between select() and poll()?
When will my application receive SIGPIPE?
What is the purpose of socket?
How do I convert a string into an internet address?
What exactly does SO_LINGER do?
When should I use shutdown()?