How can I read ICMP errors from connected UDP sockets?



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

Post New Answer

More Unix Socket Programming Interview Questions

How do I properly close a socket?

1 Answers  


What is socket address?

0 Answers  


How do unix sockets work?

0 Answers  


What is difference between socket and websocket?

0 Answers  


What is a socket set used for?

0 Answers  






How can my client work through a firewall/proxy server?

1 Answers  


Whats the difference between select() and poll()?

0 Answers  


When will my application receive SIGPIPE?

1 Answers  


What is the purpose of socket?

0 Answers  


How do I convert a string into an internet address?

0 Answers  


What exactly does SO_LINGER do?

1 Answers  


When should I use shutdown()?

1 Answers   Wipro,


Categories