public interface SocketFactory
| Modifier and Type | Method and Description |
|---|---|
java.net.ServerSocket |
createServerSocket(java.net.InetAddress host,
int port)
Creates a new socket listening to the specified host and port.
|
java.net.Socket |
createSocket(java.net.InetAddress host,
int port)
Creates a new socket to the specified host and port.
|
java.net.Socket createSocket(java.net.InetAddress host,
int port)
throws java.io.IOException
host - the remote hostport - the remote portSocket instance.java.io.IOException - if an I/O error occurs when creating the socket.java.net.ServerSocket createServerSocket(java.net.InetAddress host,
int port)
throws java.io.IOException
host - the local hostport - the local portServerSocket instance.java.io.IOException - if an I/O error occurs when creating the socket.