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 does it take so long to detect that the peer died?

0 Answers  


Why do I keep getting EINTR from the socket calls?

1 Answers  


What is difference between socket () and serversocket () class?

0 Answers  


How can I find the full hostname (FQDN) of the system I am running on?

1 Answers  


How can I listen on more than one port at a time?

1 Answers  






How are unix domain sockets implemented?

0 Answers  


How do I use TCP_NODELAY?

0 Answers  


What are the types of sockets?

0 Answers  


What is the difference between SO_REUSEADDR and SO_REUSEPORT?

0 Answers  


When should I use shutdown()?

1 Answers   Wipro,


What is a sae socket?

0 Answers  


What is the difference between connected and unconnected sockets?

1 Answers  


Categories