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


Please Help Members By Posting Answers For Below Questions

Why sockets are used?

674


What is a socket api?

670


How do I convert a string into an internet address?

1054


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

1123


What's the difference between impact sockets and regular sockets?

625


How many socket connections can a server handle?

631


What is socket programming in java?

643


What pieces of information make up a socket?

735


How many sockets can a cpu have?

640


What is active unix domain sockets?

707


What are the types of sockets?

682


How can I set the timeout for the connect() system call?

1262


Can multiple clients connect to same socket?

654


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

639


Why do I get EPROTO from read()?

1149