Socket what is
Attention reader! Socket are generally employed in client server applications. The server creates a socket, attaches it to a network port addresses then waits for the client to contact it.
The client creates a socket and then attempts to connect to the server socket. When the connection is established, transfer of data takes place. Skip to content.
Change Language. Related Articles. Dictionary Dictionary Term of the Day. Natural Language Processing. Techopedia Terms.
Connect with us. Sign up. Term of the Day. Best of Techopedia weekly. News and Special Offers occasional. Techopedia Explains Socket. What Does Socket Mean? Share this Term. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.
Normally, a server runs on a specific computer and has a socket that is bound to a specific port number. The server just waits, listening to the socket for a client to make a connection request.
On the client-side: The client knows the hostname of the machine on which the server is running and the port number on which the server is listening.
To make a connection request, the client tries to rendezvous with the server on the server's machine and port. The client also needs to identify itself to the server so it binds to a local port number that it will use during this connection.
This is usually assigned by the system. If everything goes well, the server accepts the connection. Upon acceptance, the server gets a new socket bound to the same local port and also has its remote endpoint set to the address and port of the client.