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 do Sockets Work?

Answer Posted / chaitanya

The implementation is left up to the vendor of your particular unix, but from the point of view of the programmer, connection-oriented sockets work a lot like files, or pipes. The most noticeable difference, once you have your file descriptor is that read() or write() calls may actually read or write fewer bytes than requested. If this happens, then you will have to make a second call for the rest of the data. There are examples of this in the source code that accompanies the faq.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

794


What is the difference between a socket and a port?

822


Are unix sockets faster than tcp?

803


Whats the difference between select() and poll()?

1580


What is a socket connection?

880


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

1462


What is the difference between read() and recv()?

1899


What is socket address?

971


Can a single socket port be used for multiple applications?

834


What is sae socket?

774


What is the function of socket?

860


What is the purpose of socket?

848


What is the difference between SO_REUSEADDR and SO_REUSEPORT?

1745


What is active unix domain sockets?

852


What does af mean in sockets?

871