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 |
Why sockets are used?
Explain the TIME_WAIT state.
How would I put my socket in non-blocking mode?
What is socket programming in java?
What exactly does SO_LINGER do?
How can I bind() to a port number < 1024?
How can I read ICMP errors from connected UDP sockets?
What is the function of socket?
What is socket address?
What are the pros/cons of select(), non-blocking I/O and SIGIO?
How should I choose a port number for my server?
of the socket? Does doing a connect() call affect the receive behaviour?