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 |
Can multiple sockets use the same port?
How can I read only one character at a time?
How do I properly close a socket?
Why does it take so long to detect that the peer died?
How come select says there is data, but read returns zero?
What is the purpose of socket?
What are raw sockets?
over the socket? Is there a way to have a dynamic buffer? What does one do when one does not know how much information is coming?
How does a socket work?
How can I bind() to a port number < 1024?
How should I choose a port number for my server?
What is a socket set used for?