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

What are the pros/cons of select(), non-blocking I/O and SIGIO?

0 Answers  


What is Mac, and how is it different from PC? Which one is better for professional users, and why

1 Answers   Evolving Systems, IBM,


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

0 Answers  


Explain the TIME_WAIT state.

1 Answers  


What is difference between socket () and serversocket () class?

0 Answers  






Why do I get EPROTO from read()?

0 Answers  


What is a socket api?

0 Answers  


Why do we need sockets?

0 Answers  


What is sae socket?

0 Answers  


How do I convert a string into an internet address?

0 Answers  


How can I write a multi-homed server?

0 Answers  


How can I be sure that UDP messages are received in order?

1 Answers  


Categories