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 do I convert a string into an internet address?
What is difference between socket () and serversocket () class?
Why does the sockets buffer fill up sooner than expected?
What is the function of socket?
What pieces of information make up a socket?
system choose one for me on the connect() call? Should I bind() a port number in my client program, or let the?
How can I force a socket to send the data in its buffer?
What is difference between socket and websocket?
How to find other end of unix socket connection?
Can a single socket port be used for multiple applications?
What's the difference between a socket and a port?
How come I get address already in use from bind()?