Socket is one end-point of a two-way communication link between two programs running on the network. The java.net package provides two classes--Sockets and ServerSocket--that implement the client side of the connection and the server side of the connection, respectively.European sockets classes are used to represent the connection between a client program and a server program.