Socket

Why Trust Techopedia

What Does Socket Mean?

A socket is a software object that acts as an end point establishing a bidirectional network communication link between a server-side and a client-side program.

Advertisements

In UNIX, a socket can also be referred to as an endpoint for interprocess communication(IPC) within the operating system(OS).

In Java, socket classes represent the communication between client and server programs. Socket classes handle client-side communication, and server socket classes handle server-side communication.

Techopedia Explains Socket

Mostly URLs and their connections are used to access the Internet, but sometimes programs require a simple communication link between the program’s client and server side. This role would be associated to a socket which would tie the program’s client and server sides.

When a client establishes communication with the server, for example by querying the database, a reliable server and client connection is established via a TCP communication channel. In this type of communication, the client and server can read or write on sockets tied to specific communication channel.

Sockets are mainly classified into two types: active and passive. Active sockets are connected with the remote active sockets through an open data connection. If this connection is closed, the active sockets at each end point is destroyed. Passive sockets are not connected; instead, they wait for an incoming connection that will spawn a new active socket.

Even though there exists a close relationship between a socket and a port, the socket is not actually a port. Every port may have a single passive socket waiting for incoming connections and several active sockets each respective to an open connection in the port.

Advertisements

Related Terms

Margaret Rouse
Editor

Margaret jest nagradzaną technical writerką, nauczycielką i wykładowczynią. Jest znana z tego, że potrafi w prostych słowach pzybliżyć złożone pojęcia techniczne słuchaczom ze świata biznesu. Od dwudziestu lat jej definicje pojęć z dziedziny IT są publikowane przez Que w encyklopedii terminów technologicznych, a także cytowane w artykułach ukazujących się w New York Times, w magazynie Time, USA Today, ZDNet, a także w magazynach PC i Discovery. Margaret dołączyła do zespołu Techopedii w roku 2011. Margaret lubi pomagać znaleźć wspólny język specjalistom ze świata biznesu i IT. W swojej pracy, jak sama mówi, buduje mosty między tymi dwiema domenami, w ten…