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
How can I tell when a socket is closed on the other end?
Why sockets are used?
What is the difference between SO_REUSEADDR and SO_REUSEPORT?
Are unix sockets faster than tcp?
Can multiple sockets use the same port?
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?
Is tcp or unix socket faster?
What are the types of sockets?
Is a socket a file?
Why do we need sockets?
Can a socket have multiple ports?
How is a socket created?
What exactly is a socket?
How many socket connections can a server handle?