A socket is a software endpoint that establishes bidirectional
communication between a server program and one or
more client programs.
The socket associates the server program with a specific
port on the machine where it runs so any client
program anywhere in the network with a socket associated with that
same port can communicate with the server program.
A port can be thought of as an address
within a single computer.