public class SocketFactory13 extends SocketFactory
Modifier and Type | Field and Description |
---|---|
(package private) static SocketFactory |
factory
The SocketFactory singleton for this class.
|
DefaultFactory, logger
Constructor and Description |
---|
SocketFactory13() |
Modifier and Type | Method and Description |
---|---|
Socket |
createSocket(InetAddress addr,
int port,
InetAddress localAddr,
int localPort,
int timeout)
Creates a socket and connects it to the specified remote host on the
specified remote port.
|
Socket |
createSocket(InetAddress addr,
int port,
int timeout)
Creates a stream socket and connects it to the specified port number at
the specified IP address.
|
static SocketFactory |
getFactory()
Returns the SocketFactory singleton for this class.
|
getDefaultFactory, getFactory, getSocketFactory
static SocketFactory factory
public static SocketFactory getFactory()
public Socket createSocket(InetAddress addr, int port, int timeout) throws IOException
Be careful, currently the timeout option is not implemented. If the specified timeout is not equals to 0 this method throws an UnsupportedOperationException.
createSocket
in class SocketFactory
addr
- the IP address.port
- the port number.timeout
- the timeout value to be used in milliseconds.IOException
public Socket createSocket(InetAddress addr, int port, InetAddress localAddr, int localPort, int timeout) throws IOException
Be careful, currently the timeout option is not implemented. If the specified timeout is not equals to 0 this method throws an UnsupportedOperationException.
createSocket
in class SocketFactory
addr
- the IP address of the remote hostport
- the remote portlocalAddr
- the local address the socket is bound tolocalPort
- the local port the socket is bound totimeout
- the timeout value to be used in milliseconds.IOException
Copyright © 2016 ScalAgent D.T.. All Rights Reserved.