A factory for (client) sockets. More...
Public Member Functions | |
Socket | createSocket (String host, int port) throws IOException, UnknownHostException |
Creates a Socket connected to a given host/port. |
A factory for (client) sockets.
This works similar to javax.net.SocketFactory, but with the ability to replace/wrap the Streams without having to subclass Socket (and it works with before JDK 1.4, too).
An application may pass an implementation of this interface to the Session to control the creation of outgoing Sockets for port forwardings (to other hosts/ports on the local side) or for the main connection to the remote host.
Definition at line 51 of file SocketFactory.java.
Socket com.jcraft.jsch.SocketFactory.createSocket | ( | String | host, | |
int | port | |||
) | throws IOException, UnknownHostException |
Creates a Socket connected to a given host/port.
host | the destination host name. | |
port | the destination port number. |
Referenced by com.jcraft.jsch.Session.connect(), and com.jcraft.jsch.ChannelForwardedTCPIP.run().