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 |
What is the difference between connected and unconnected sockets?
What's better 6pt or 12pt sockets?
Why does connect() succeed even before my server did an accept()?
Is socket a hardware or software?
Can a single socket port be used for multiple applications?
Why do we need sockets?
Why do we need socket programming?
What is the difference between close() and shutdown()?
How can I listen on more than one port at a time?
What is the function of socket?
Why do I get EPROTO from read()?
system choose one for me on the connect() call? Should I bind() a port number in my client program, or let the?