public class ChannelDirectTCPIP extends Channel
Modifier and Type | Method and Description |
---|---|
void |
connect(int connectTimeout)
opens the channel.
|
protected Packet |
genChannelOpenPacket() |
void |
run()
Not for external use - the channel transfer loop.
|
void |
setHost(String host)
Sets the remote host name (or IP address) to connect to
(which should be valid at the remote side).
|
void |
setInputStream(InputStream in)
Sets the InputStream to be forwarded.
|
void |
setOrgIPAddress(String foo)
Sets the local originator IP address we pretend the connection
came from.
|
void |
setOrgPort(int foo)
Sets the local originator port number we pretend the connection
came from.
|
void |
setOutputStream(OutputStream out)
Sets the OutputStream to be forwarded.
|
void |
setPort(int port)
Sets the remote port number to connect to.
|
connect, disconnect, getExitStatus, getExtInputStream, getId, getInputStream, getOutputStream, getSession, isClosed, isConnected, isEOF, sendChannelOpen, sendOpenConfirmation, sendOpenFailure, sendSignal, setExtOutputStream, setExtOutputStream, setInputStream, setOutputStream, setXForwarding, start
public void connect(int connectTimeout) throws JSchException
connect
in class Channel
connectTimeout
- the maximum time to wait for the
channel to be established, in milliseconds. If 0, we wait
as long as needed (but at most 1000 times 50 milliseconds each).JSchException
- if a timeout occured, or some other connection
problem.public void run()
public void setInputStream(InputStream in)
connect(int)
.setInputStream
in class Channel
public void setOutputStream(OutputStream out)
connect(int)
.setOutputStream
in class Channel
Channel.getInputStream()
public void setHost(String host)
connect(int)
.setPort(int)
public void setPort(int port)
connect(int)
.setHost(java.lang.String)
public void setOrgIPAddress(String foo)
"127.0.0.1"
.
This should be called before connect(int)
.setOrgPort(int)
public void setOrgPort(int foo)
0
.
This should be called before connect(int)
.setOrgIPAddress(java.lang.String)
protected Packet genChannelOpenPacket()
genChannelOpenPacket
in class Channel
This is an inofficial Javadoc created by PaĆlo Ebermann. Have a look at the official homepage.