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 many sockets can a cpu have?
How do I properly close a socket?
When should I use UDP instead of TCP?
of the socket? Does doing a connect() call affect the receive behaviour?
How can I read only one character at a time?
How does unix socket work?
How can I force a socket to send the data in its buffer?
Whats the difference between select() and poll()?
How can I bind() to a port number < 1024?
How are unix domain sockets implemented?
Why do we need socket programming?
What is with the second parameter in bind()?