How do Sockets Work?



How do Sockets Work?..

Answer / 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

More Unix Socket Programming Interview Questions

After the chroot(), calls to socket() are failing. Why?

1 Answers  


What is the purpose of socket?

0 Answers  


What is a socket file?

0 Answers  


Why do not my sockets close?

1 Answers  


What is socket programming in java?

0 Answers  






Why sockets are used?

0 Answers  


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

0 Answers  


Why do we need sockets?

0 Answers  


What is a socket set used for?

0 Answers  


How can I put a timeout on connect()?

1 Answers  


Is tcp or unix socket faster?

0 Answers  


Where is the socket located?

0 Answers  


Categories