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

When will my application receive SIGPIPE?

1 Answers  


What is the purpose of socket?

0 Answers  


How come only the first part of my datagram is getting through?

1 Answers  


What are socket exceptions? What is out-of-band data?

1 Answers  


How do I get my server to find out the clients address / host- name?

1 Answers  


When should I use UDP instead of TCP?

1 Answers  


Can a single socket port be used for multiple applications?

0 Answers  


What is a socket connection?

0 Answers  


What pieces of information make up a socket?

0 Answers  


How can I write a multi-homed server?

0 Answers  


Why do not my sockets close?

1 Answers  


How to find other end of unix socket connection?

0 Answers  


Categories