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 |
How can I be sure that UDP messages are received in order?
What is difference between socket and websocket?
What exactly does SO_LINGER do?
If bind() fails, what should I do with the socket descriptor?
How do I get my server to find out the clients address / host- name?
What is socket address?
Explain the TIME_WAIT state.
How come only the first part of my datagram is getting through?
How many sockets can a port have?
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 many sockets can a cpu have?
How do Sockets Work?