How come select says there is data, but read returns zero?
Answer Posted / 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 |
Post New Answer View All Answers
What's the difference between a socket and a port?
What is a socket api?
What is active unix domain sockets?
Why does the sockets buffer fill up sooner than expected?
What is the difference between read() and recv()?
Are unix sockets faster than tcp?
Is there any advantage to handling the signal, rather than just ignoring it and checking for the EPIPE error? Are there any useful parameters passed to the signal catching function?
How does unix socket work?
What is difference between socket () and serversocket () class?
Why do I get EPROTO from read()?
Can multiple clients connect to same socket?
What is the function of socket?
Whats the difference between select() and poll()?
What is difference between socket and websocket?
Where is the socket located?