com.jcraft.jsch.SocketFactory Interface Reference

A factory for (client) sockets. More...

List of all members.

Public Member Functions

Socket createSocket (String host, int port) throws IOException, UnknownHostException
 Creates a Socket connected to a given host/port.

Detailed Description

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.

See also:
ServerSocketFactory
Session.setSocketFactory
Session.setPortForwardingR(String, int, String, int, SocketFactory)

Definition at line 51 of file SocketFactory.java.


Member Function Documentation

Socket com.jcraft.jsch.SocketFactory.createSocket ( String  host,
int  port 
) throws IOException, UnknownHostException

Creates a Socket connected to a given host/port.

Parameters:
host the destination host name.
port the destination port number.

Referenced by com.jcraft.jsch.Session.connect(), and com.jcraft.jsch.ChannelForwardedTCPIP.run().


The documentation for this interface was generated from the following file:

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1