A socket is one end-point of a two-way communication link among two programs running on the network. Socket classes are used to show the connection among a client program and a server program. The java.net package gives two classes--Socket and ServerSocket--that execute the client side of the connection and the server side of the connection, correspondingly.