What are Sockets?

Answer Posted / chaitanya

Sockets are just like "worm holes" in science fiction. When things go into one end, they (should) come out of the other. Different kinds of sockets have different properties. Sockets are either connection- oriented or connectionless. Connection-oriented sockets allow for data to flow back and forth as needed, while connectionless sockets (also known as datagram sockets) allow only one message at a time to be transmitted, without an open connection. There are also different socket families. The two most common are AF_INET for internet connections, and AF_UNIX for unix IPC (interprocess communication). As stated earlier, this FAQ deals only with AF_INET sockets.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a socket address?

516


How is a socket created?

505


How are unix domain sockets implemented?

489


What is the function of socket?

509


What is socket address?

561






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

1088


Why does it take so long to detect that the peer died?

1143


Why sockets are used?

515


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

451


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

1104


How can I write a multi-homed server?

1271


What is a deep well socket?

512


What's better 6pt or 12pt sockets?

472


How do unix sockets work?

486


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

966