Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 do we need sockets?

820


What are the pros/cons of select(), non-blocking I/O and SIGIO?

1351


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

832


Why does the sockets buffer fill up sooner than expected?

1333


What is a socket set used for?

941


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

854


How is a socket created?

905


Why do I get EPROTO from read()?

1439


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

1606


What pieces of information make up a socket?

949


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?

1411


What is difference between socket and websocket?

893


How do I convert a string into an internet address?

1373


What is the difference between SO_REUSEADDR and SO_REUSEPORT?

1796


How to find other end of unix socket connection?

879