Logo Search packages:      
Sourcecode: jenkins-trilead-ssh2 version File versions  Download package

synchronized LocalPortForwarder com::trilead::ssh2::Connection::createLocalPortForwarder ( InetSocketAddress  addr,
String  host_to_connect,
int  port_to_connect 
) throws IOException [inline]

Creates a new LocalPortForwarder. A LocalPortForwarder forwards TCP/IP connections that arrive at a local port via the secure tunnel to another host (which may or may not be identical to the remote SSH-2 server).

This method must only be called after one has passed successfully the authentication step. There is no limit on the number of concurrent forwardings.

addrspecifies the InetSocketAddress where the local socket shall be bound to.
host_to_connecttarget address (IP or hostname)
port_to_connecttarget port
A LocalPortForwarder object.

Definition at line 802 of file Connection.java.

            if (tm == null)
                  throw new IllegalStateException("Cannot forward ports, you need to establish a connection first.");

            if (!authenticated)
                  throw new IllegalStateException("Cannot forward ports, connection is not authenticated.");

            return new LocalPortForwarder(cm, addr, host_to_connect, port_to_connect);

Generated by  Doxygen 1.6.0   Back to index