Package com.trilead.ssh2
Class LocalPortForwarder
java.lang.Object
com.trilead.ssh2.LocalPortForwarder
A
LocalPortForwarder
forwards TCP/IP connections to a local
port via the secure tunnel to another host (which may or may not be identical
to the remote SSH-2 server). Checkout Connection.createLocalPortForwarder(int, String, int)
on how to create one.- Version:
- $Id: LocalPortForwarder.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ChannelManager
(package private) String
(package private) LocalAcceptThread
(package private) int
-
Constructor Summary
ConstructorsConstructorDescriptionLocalPortForwarder
(ChannelManager cm, int local_port, String host_to_connect, int port_to_connect) LocalPortForwarder
(ChannelManager cm, InetSocketAddress addr, String host_to_connect, int port_to_connect) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Stop TCP/IP forwarding of newly arriving connections.int
-
Field Details
-
cm
-
host_to_connect
String host_to_connect -
port_to_connect
int port_to_connect -
lat
-
-
Constructor Details
-
LocalPortForwarder
LocalPortForwarder(ChannelManager cm, int local_port, String host_to_connect, int port_to_connect) throws IOException - Throws:
IOException
-
LocalPortForwarder
LocalPortForwarder(ChannelManager cm, InetSocketAddress addr, String host_to_connect, int port_to_connect) throws IOException - Throws:
IOException
-
-
Method Details
-
close
Stop TCP/IP forwarding of newly arriving connections.- Throws:
IOException
- the io exception
-
getLocalPort
public int getLocalPort()
-