public interface SocketFactory
| Modifier and Type | Method and Description |
|---|---|
java.net.Socket |
createSocket(java.net.InetAddress address,
int port)
Create a socket and connect to remote address specified.
|
java.net.Socket |
createSocket(java.net.InetAddress address,
int port,
java.net.InetAddress localAddress,
int localPort)
Create a socket and connect to remote address specified
originating from specified local address.
|
java.net.Socket createSocket(java.net.InetAddress address,
int port)
throws java.io.IOException
address - the remote addressport - the remote portjava.io.IOException - if an error occursjava.net.Socket createSocket(java.net.InetAddress address,
int port,
java.net.InetAddress localAddress,
int localPort)
throws java.io.IOException
address - the remote addressport - the remote portlocalAddress - the local addresslocalPort - the local portjava.io.IOException - if an error occurs