public class SocketFactory14 extends SocketFactory
| Modifier and Type | Field and Description |
|---|---|
(package private) static SocketFactory |
factory
The SocketFactory singleton for this class.
|
DefaultFactory, logger| Constructor and Description |
|---|
SocketFactory14() |
| 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, getSocketFactorystatic SocketFactory factory
public static SocketFactory getFactory()
public Socket createSocket(InetAddress addr, int port, int timeout) throws IOException
createSocket in class SocketFactoryaddr - the IP address.port - the port number.timeout - the timeout value to be used in milliseconds.IOException - if an I/O error occurs when opening the socket.public Socket createSocket(InetAddress addr, int port, InetAddress localAddr, int localPort, int timeout) throws IOException
createSocket in class SocketFactoryaddr - 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 - if an I/O error occurs when opening the socket.Copyright © 2022 ScalAgent D.T.. All rights reserved.