How can I read ICMP errors from connected UDP sockets?
Answer Posted / 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 View All Answers
Why does the sockets buffer fill up sooner than expected?
Are unix sockets faster than tcp?
system choose one for me on the connect() call? Should I bind() a port number in my client program, or let the?
What is the difference between SO_REUSEADDR and SO_REUSEPORT?
What's the difference between impact sockets and regular sockets?
How are unix domain sockets implemented?
Whats the difference between select() and poll()?
What does af mean in sockets?
How many sockets can a port have?
What is the purpose of socket?
Where is the socket located?
How many socket connections can a server handle?
Why do we need socket programming?
How can I force a socket to send the data in its buffer?
How can I set the timeout for the connect() system call?