Package com.trilead.ssh2.transport
Class TransportManager
- java.lang.Object
-
- com.trilead.ssh2.transport.TransportManager
-
public class TransportManager extends Object
TransportManager.- Version:
- $Id: TransportManager.java,v 1.2 2008/04/01 12:38:09 cplattne Exp $
- Author:
- Christian Plattner, plattner@trilead.com
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_PACKET_SIZEAdvertised maximum SSH packet size that the other side can send to us.
-
Constructor Summary
Constructors Constructor Description TransportManager(String host, int port)TransportManager(String host, int port, String sourceAddress)
-
Method Summary
-
-
-
Constructor Detail
-
TransportManager
public TransportManager(String host, int port) throws IOException
- Throws:
IOException
-
TransportManager
public TransportManager(String host, int port, String sourceAddress) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getPacketOverheadEstimate
public int getPacketOverheadEstimate()
-
setTcpNoDelay
public void setTcpNoDelay(boolean state) throws IOException- Throws:
IOException
-
setSoTimeout
public void setSoTimeout(int timeout) throws IOException- Throws:
IOException
-
getConnectionInfo
public ConnectionInfo getConnectionInfo(int kexNumber) throws IOException
- Throws:
IOException
-
getVersionInfo
public ClientServerHello getVersionInfo()
-
getReasonClosedCause
public Throwable getReasonClosedCause()
If the socket connection is lost (either by this side closing down or the other side closing down),- Returns:
- a non-null object indicating the cause of the connection loss.
-
isConnectionClosed
public boolean isConnectionClosed()
-
getSessionIdentifier
public byte[] getSessionIdentifier()
-
close
public void close(Throwable cause, boolean useDisconnectPacket)
-
initialize
public void initialize(CryptoWishList cwl, ServerHostKeyVerifier verifier, DHGexParameters dhgex, int connectTimeout, SecureRandom rnd, ProxyData proxyData) throws IOException
- Throws:
IOException
-
initialize
public void initialize(CryptoWishList cwl, ServerHostKeyVerifier verifier, DHGexParameters dhgex, int connectTimeout, int readTimeout, SecureRandom rnd, ProxyData proxyData) throws IOException
- Throws:
IOException
-
registerMessageHandler
public void registerMessageHandler(MessageHandler mh, int low, int high)
-
removeMessageHandler
public void removeMessageHandler(MessageHandler mh, int low, int high)
-
sendKexMessage
public void sendKexMessage(byte[] msg) throws IOException- Throws:
IOException
-
kexFinished
public void kexFinished() throws IOException- Throws:
IOException
-
forceKeyExchange
public void forceKeyExchange(CryptoWishList cwl, DHGexParameters dhgex) throws IOException
- Throws:
IOException
-
changeRecvCipher
public void changeRecvCipher(BlockCipher bc, MAC mac)
-
changeSendCipher
public void changeSendCipher(BlockCipher bc, MAC mac)
-
sendAsynchronousMessage
public void sendAsynchronousMessage(byte[] msg) throws IOException- Throws:
IOException
-
setConnectionMonitors
public void setConnectionMonitors(Vector monitors)
-
sendMessage
public void sendMessage(byte[] msg) throws IOException- Throws:
IOException
-
receiveLoop
public void receiveLoop() throws IOException- Throws:
IOException
-
-