How come select says there is data, but read returns zero?



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

Post New Answer

More Unix Socket Programming Interview Questions

Why do I get connection refused when the server is not running?

1 Answers  


How do I send [this] over a socket?

1 Answers  


What is a socket connection?

0 Answers  


How do I properly close a socket?

1 Answers  


What is the difference between connected and unconnected sockets?

1 Answers  






How can I tell when a socket is closed on the other end?

0 Answers  


What is difference between socket and websocket?

0 Answers  


Why do we need sockets?

0 Answers  


How can I put a timeout on connect()?

1 Answers  


What's the difference between a socket and a port?

0 Answers  


What is a sae socket?

0 Answers  


Why sockets are used?

0 Answers  


Categories