2nd October 2019

stackoverflow
12

What is the use of socket programming?

Sockets provide the communication mechanism between two computers using TCP. A client program creates a socket on its end of the communication and attempts to connect that socket to a server. When the connection is made, the server creates a socket object on its end of the communication.

How does the socket work?

Sockets are commonly used for client/server interaction. A socket has a typical flow of events. In a connection-oriented client-to-server model, the socket on the server process waits for requests from a client. To do this, the server first establishes (binds) an address that clients can use to find the server.

What is the use of socket in Linux?

A socket is just a logical endpoint for communication. They exist on the transport layer. You can send and receive things on a socket, you can bind and listen to a socket. A socket is specific to a protocol, machine, and port, and is addressed as such in the header of a packet.
Write Your Answer

Rate

60% people found this answer useful, click to cast your vote.

3 / 5 based on 2 votes.

Bookmark

Press Ctrl + D to add this site to your favorites!

Share