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

What are raw sockets?

4 Answers   Axis Technologies,


Why do we need sockets?

0 Answers  


Are unix sockets faster than tcp?

0 Answers  


Why does connect() succeed even before my server did an accept()?

1 Answers  


Is socket a hardware or software?

0 Answers  






What is LILO?

2 Answers  


What is the difference between close() and shutdown()?

1 Answers  


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

0 Answers  


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

0 Answers  


When will my application receive SIGPIPE?

1 Answers  


What is the function of socket?

0 Answers  


over the socket? Is there a way to have a dynamic buffer? What does one do when one does not know how much information is coming?

1 Answers  


Categories