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

How can I be sure that UDP messages are received in order?

1 Answers  


over the socket? Is there a way to have a dynamic buffer? What does one do when one does not know how much information is coming?

1 Answers  


What is af_inet in socket?

0 Answers  


How can I read ICMP errors from connected UDP sockets?

1 Answers  


Why do we need socket programming?

0 Answers  






How can I force a socket to send the data in its buffer?

0 Answers  


How do Sockets Work?

1 Answers  


What is difference between socket and websocket?

0 Answers  


How does a socket work?

0 Answers  


Why does the sockets buffer fill up sooner than expected?

0 Answers  


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

1 Answers  


system choose one for me on the connect() call? Should I bind() a port number in my client program, or let the?

0 Answers  


Categories