twisted.conch.ssh.forwarding.SSHConnectForwardingChannel(channel.SSHChannel)
class documentationtwisted.conch.ssh.forwarding
View Source
(View In Hierarchy)
Known subclasses: twisted.conch.scripts.conch.SSHConnectForwardingChannel
Channel used for handling server side forwarding request. It acts as a client for the remote forwarding destination.
Instance Variable | hostport | (host, port) requested by client as forwarding destination. (type: tuple
or a sequence ) |
Instance Variable | client | Protocol connected to the forwarding destination. (type: protocol.Protocol ) |
Instance Variable | clientBuf | Data received while forwarding channel is not yet connected. (type: bytes ) |
Method | __init__ | Undocumented |
Method | channelOpen | See: channel.SSHChannel |
Method | dataReceived | See: channel.SSHChannel |
Method | closed | See: channel.SSHChannel |
Variable | _reactor | Reactor used for TCP connections. (type: A reactor.) |
Instance Variable | _channelOpenDeferred | Deferred used in testing to check the result of channelOpen . (type: twisted.internet.defer.Deferred ) |
Method | _setClient | Called when the connection was established to the forwarding destination. |
Method | _close | Called when failed to connect to the forwarding destination. |
Inherited from SSHChannel:
Instance Variable | name | the name of the channel. (type: bytes ) |
Instance Variable | localWindowSize | the maximum size of the local window in bytes. (type: int ) |
Instance Variable | localWindowLeft | how many bytes are left in the local window. (type: int ) |
Instance Variable | localMaxPacket | the maximum size of packet we will accept in bytes. (type: int ) |
Instance Variable | remoteWindowLeft | how many bytes are left in the remote window. (type: int ) |
Instance Variable | remoteMaxPacket | the maximum size of a packet the remote side will accept in bytes. (type: int ) |
Instance Variable | conn | the connection this channel is multiplexed through. (type: SSHConnection ) |
Instance Variable | data | any data to send to the other size when the channel is requested. (type: bytes ) |
Instance Variable | avatar | an avatar for the logged-in user (if a server channel) |
Instance Variable | localClosed | True if we aren't accepting more data. (type: bool ) |
Instance Variable | remoteClosed | True if the other size isn't accepting more data. (type: bool ) |
Method | __str__ | Undocumented |
Method | __bytes__ | Return a byte string representation of the channel |
Method | logPrefix | Override this method to insert custom logging behavior. Its return value will be inserted in front of every line. It may be called more times than the number of output lines. |
Method | openFailed | Called when the open failed for some reason. reason.desc is a string descrption, reason.code the SSH error code. |
Method | addWindowBytes | Called when bytes are added to the remote window. By default it clears the data buffers. |
Method | requestReceived | No summary |
Method | extReceived | Called when we receive extended data (usually standard error). |
Method | eofReceived | Called when the other side will send no more data. |
Method | closeReceived | Called when the other side has closed the channel. |
Method | write | Write some data to the channel. If there is not enough remote window available, buffer until it is. Otherwise, split the data into packets of length remoteMaxPacket and send them. |
Method | writeExtended | Send extended data to this channel. If there is not enough remote window available, buffer until there is. Otherwise, split the data into packets of length remoteMaxPacket and send them. |
Method | writeSequence | Part of the Transport interface. Write a list of strings to the channel. |
Method | loseConnection | Close the channel if there is no buferred data. Otherwise, note the request and return. |
Method | getPeer | See: ITransport.getPeer |
Method | getHost | See: ITransport.getHost |
Method | stopWriting | Called when the remote buffer is full, as a hint to stop writing. This can be ignored, but it can be helpful. |
Method | startWriting | Called when the remote buffer has more room, as a hint to continue writing. |
channelOpen
. (type: twisted.internet.defer.Deferred
)
Called when the connection was established to the forwarding destination.
Parameters | client | Client protocol connected to the forwarding destination. (type: protocol.Protocol ) |
Called when failed to connect to the forwarding destination.
Parameters | reason | Reason why connection failed. (type: twisted.python.failure.Failure ) |