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 |
What is a socket connection?
What is a socket api?
Can multiple clients connect to same socket?
Why do not my sockets close?
How many sockets can a port have?
Are unix sockets faster than tcp?
What is the difference between close() and shutdown()?
How do I use TCP_NODELAY?
How do I send [this] over a socket?
What is a socket set used for?
What exactly does SO_LINGER do?
What are the pros/cons of select(), non-blocking I/O and SIGIO?