How come select says there is data, but read returns zero?
Answer / chaitanya
The data that causes select to return is the EOF because the other side has closed the connection. This causes read to return zero.
| Is This Answer Correct ? | 0 Yes | 0 No |
When should I use UDP instead of TCP?
How do I get my server to find out the clients address / host- name?
What is difference between socket and websocket?
How would I put my socket in non-blocking mode?
What is the difference between connected and unconnected sockets?
of the socket? Does doing a connect() call affect the receive behaviour?
Explain the TIME_WAIT state.
What are socket exceptions? What is out-of-band data?
What is the difference between SO_REUSEADDR and SO_REUSEPORT?
How can I read ICMP errors from connected UDP sockets?
Can multiple sockets use the same port?
What is a socket set used for?