Java.net : Provides the classes for implementing networking applications.
Serversocket class: This class implements server sockets. A server socket waits for requests to come in over the network. It performs some operation based on that request, and then possibly returns a result to the requester.
Socket : This class implements client sockets .