public class SocketFactory extends Object
| Modifier | Constructor | Description |
|---|---|---|
protected |
SocketFactory() |
| Modifier and Type | Method | Description |
|---|---|---|
Socket |
createSocket(String host,
int port) |
|
Socket |
createSocket(String host,
int port,
InetAddress localAddr,
int localPort) |
|
Socket |
createSocket(InetAddress address,
int port) |
|
Socket |
createSocket(InetAddress address,
int port,
InetAddress localAddr,
int localPort) |
|
static SocketFactory |
getDefault() |
Returns the default instance of this class.
|
public static SocketFactory getDefault()
public Socket createSocket(String host, int port) throws IOException
IOExceptionpublic Socket createSocket(InetAddress address, int port) throws IOException
IOExceptionpublic Socket createSocket(String host, int port, InetAddress localAddr, int localPort) throws IOException
IOExceptionpublic Socket createSocket(InetAddress address, int port, InetAddress localAddr, int localPort) throws IOException
IOExceptionCopyright © 2018. All rights reserved.