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
Modifier and Type Method Description voidchangeRecvCipher(BlockCipher bc, MAC mac)voidchangeSendCipher(BlockCipher bc, MAC mac)voidclose(Throwable cause, boolean useDisconnectPacket)voidforceKeyExchange(CryptoWishList cwl, DHGexParameters dhgex)ConnectionInfogetConnectionInfo(int kexNumber)intgetPacketOverheadEstimate()ThrowablegetReasonClosedCause()If the socket connection is lost (either by this side closing down or the other side closing down),byte[]getSessionIdentifier()ClientServerHellogetVersionInfo()voidinitialize(CryptoWishList cwl, ServerHostKeyVerifier verifier, DHGexParameters dhgex, int connectTimeout, int readTimeout, SecureRandom rnd, ProxyData proxyData)voidinitialize(CryptoWishList cwl, ServerHostKeyVerifier verifier, DHGexParameters dhgex, int connectTimeout, SecureRandom rnd, ProxyData proxyData)booleanisConnectionClosed()voidkexFinished()voidreceiveLoop()voidregisterMessageHandler(MessageHandler mh, int low, int high)voidremoveMessageHandler(MessageHandler mh, int low, int high)voidsendAsynchronousMessage(byte[] msg)voidsendKexMessage(byte[] msg)voidsendMessage(byte[] msg)voidsetConnectionMonitors(Vector monitors)voidsetSoTimeout(int timeout)voidsetTcpNoDelay(boolean state)
-
Field Details
-
MAX_PACKET_SIZE
public static final int MAX_PACKET_SIZEAdvertised maximum SSH packet size that the other side can send to us.
-
-
Constructor Details
-
TransportManager
- Throws:
IOException
-
TransportManager
- Throws:
IOException
-
-
Method Details
-
getPacketOverheadEstimate
public int getPacketOverheadEstimate() -
setTcpNoDelay
- Throws:
IOException
-
setSoTimeout
- Throws:
IOException
-
getConnectionInfo
- Throws:
IOException
-
getVersionInfo
-
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
-
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
-
removeMessageHandler
-
sendKexMessage
- Throws:
IOException
-
kexFinished
- Throws:
IOException
-
forceKeyExchange
- Throws:
IOException
-
changeRecvCipher
-
changeSendCipher
-
sendAsynchronousMessage
- Throws:
IOException
-
setConnectionMonitors
-
sendMessage
- Throws:
IOException
-
receiveLoop
- Throws:
IOException
-