public class DefaultSocketFactory extends Object implements SocketFactory
SocketFactory
; creates standard Socket
instances.Constructor and Description |
---|
DefaultSocketFactory() |
Modifier and Type | Method and Description |
---|---|
Socket |
createSocket(InetAddress host,
int port)
Create a new Socket instance for the specified host and port.
|
public Socket createSocket(InetAddress host, int port) throws IOException
createSocket
in interface SocketFactory
host
- - the IP address of the host endpoint to which the socket is connectport
- - the port number of the enpoint to which the socket is connectedIOException
- - if an error occursSocketFactory.createSocket(java.net.InetAddress, int)
Copyright © 2016. All rights reserved.