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
IOException
public Socket createSocket(InetAddress address, int port) throws IOException
IOException
public Socket createSocket(String host, int port, InetAddress localAddr, int localPort) throws IOException
IOException
public Socket createSocket(InetAddress address, int port, InetAddress localAddr, int localPort) throws IOException
IOException
Copyright © 2018. All rights reserved.