How can I read ICMP errors from connected UDP sockets?
Answer Posted / 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 |
Post New Answer View All Answers
What is the difference between read() and recv()?
What is the difference between a socket and a port?
What is a socket api?
Is there any advantage to handling the signal, rather than just ignoring it and checking for the EPIPE error? Are there any useful parameters passed to the signal catching function?
How does unix socket work?
What's the difference between impact sockets and regular sockets?
Why do I get EPROTO from read()?
Is socket a hardware or software?
What is socket programming in java?
What exactly is a socket?
Why do we need sockets?
What is af_inet in socket?
What is a socket set used for?
How to find other end of unix socket connection?
Why does it take so long to detect that the peer died?