public interface SocketFactory
Socket instances.
Using this abstraction enables unit testing.| Modifier and Type | Method and Description |
|---|---|
java.net.Socket |
createSocket(java.net.InetAddress host,
int port)
Create a new Socket instance for the specified host and port.
|
java.net.Socket createSocket(java.net.InetAddress host,
int port)
throws java.io.IOException
host - - the IP address of the host endpoint to which the socket is connectport - - the port number of the enpoint to which the socket is connectedjava.io.IOException - - if an error occurs