class documentation
class TestChannel(channel.SSHChannel): (source)
A mocked-up version of twisted.conch.ssh.channel.SSHChannel.
Method | channel |
The channel is open. Set up the instance variables. |
Method | closed |
The channel is closed. Rembember it. |
Method | close |
Close was received. Remember it. |
Method | data |
Data was received. Store it in the buffer. |
Method | eof |
EOF was received. Remember it. |
Method | ext |
Extended data was received. Store it in the buffer. |
Method | log |
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 | open |
Opening the channel failed. Store the reason why. |
Method | request |
A test request. Return True if data is 'data'. |
Class Variable | name |
Undocumented |
Instance Variable | ext |
a list of 2-tuples (type, extended data) of received by the channel. |
Instance Variable | got |
True if the channel is closed. |
Instance Variable | got |
True if the other side sent EOF. |
Instance Variable | got |
True if the other side closed the connection. |
Instance Variable | got |
True if channelOpen has been called. |
Instance Variable | in |
a list of strings received by the channel. |
Instance Variable | number |
the number of requests that have been made to this channel. |
Instance Variable | open |
the reason passed to openFailed. |
Instance Variable | specific |
the specific channel open data passed to channelOpen. |
Inherited from SSHChannel
:
Method | __bytes__ |
Return a byte string representation of the channel |
Method | __init__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | add |
Called when bytes are added to the remote window. By default it clears the data buffers. |
Method | get |
See: ITransport.getHost |
Method | get |
See: ITransport.getPeer |
Method | lose |
Close the channel if there is no buferred data. Otherwise, note the request and return. |
Method | request |
Called when a request is sent to this channel. By default it delegates to self.request_<requestType>. If this function returns true, the request succeeded, otherwise it failed. |
Method | start |
Called when the remote buffer has more room, as a hint to continue writing. |
Method | stop |
Called when the remote buffer is full, as a hint to stop writing. This can be ignored, but it can be helpful. |
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 | write |
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 | write |
Part of the Transport interface. Write a list of strings to the channel. |
Instance Variable | are |
Undocumented |
Instance Variable | avatar |
an avatar for the logged-in user (if a server channel) |
Instance Variable | buf |
Undocumented |
Instance Variable | closing |
Undocumented |
Instance Variable | conn |
the connection this channel is multiplexed through. |
Instance Variable | data |
any data to send to the other side when the channel is requested. |
Instance Variable | ext |
Undocumented |
Instance Variable | id |
Undocumented |
Instance Variable | local |
True if we aren't accepting more data. |
Instance Variable | local |
the maximum size of packet we will accept in bytes. |
Instance Variable | local |
how many bytes are left in the local window. |
Instance Variable | local |
the maximum size of the local window in bytes. |
Instance Variable | remote |
True if the other side isn't accepting more data. |
Instance Variable | remote |
the maximum size of a packet the remote side will accept in bytes. |
Instance Variable | remote |
how many bytes are left in the remote window. |
Class Variable | _log |
Undocumented |
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.