javax.net

Provides classes for networking applications. These classes include factories for creating sockets. Using socket factories you can encapsulate socket creation and configuration behavior.

Classes

ServerSocketFactory This class creates server sockets. 
SocketFactory This class creates sockets.