Socket Vs Port

Socket Vs Port

A socket is a network communications endpoint. The analogy is to a wire (the network data connection) being plugged into a socket.

Sockets come in two primary flavors. An active socket is connected to a remote active socket via an open data connection. Closing the connection destroys the active sockets at each endpoint. A passive socket is not connected, but rather awaits an incoming connection, which will spawn a new active socket.

A socket is not a port, though there is a close relationship between them. A socket is associated with a port, though this is a many-to-one relationship. Each port can have a single passive socket, awaiting incoming connections, and multiple active sockets, each corresponding to an open connection on the port.

A port is a logical connection method two end points communicate with. Ports operate at the Transport layer of the OSI.

Sockets are a means of plugging the application layer in. Sockets are determined by an IP address and port number.A socket is one end point of a connection.

 

Source: http://pro-programmers.blogspot.in/2009/02/socket-vs-port.html

You can leave a response, or trackback from your own site.

One Response to “Socket Vs Port”

  1. poop bags says:

    This writing has inspired me to carry on writing on my own blog

Leave a Reply

Designed for Ares Galaxy in Collaboration with Hostgator coupons and Popular Wordpress Themes and unlock iphone 5