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 is the difference between connected and unconnected sockets?

1 Answers  


What's better 6pt or 12pt sockets?

0 Answers  


Why does connect() succeed even before my server did an accept()?

1 Answers  


Is socket a hardware or software?

0 Answers  


Can a single socket port be used for multiple applications?

0 Answers  






Why do we need sockets?

0 Answers  


Why do we need socket programming?

0 Answers  


What is the difference between close() and shutdown()?

1 Answers  


How can I listen on more than one port at a time?

1 Answers  


What is the function of socket?

0 Answers  


Why do I get EPROTO from read()?

0 Answers  


system choose one for me on the connect() call? Should I bind() a port number in my client program, or let the?

0 Answers  


Categories