class documentation

A mocked-up version of twisted.conch.ssh.channel.SSHChannel.

Method channelOpen The channel is open. Set up the instance variables.
Method closed The channel is closed. Rembember it.
Method closeReceived Close was received. Remember it.
Method dataReceived Data was received. Store it in the buffer.
Method eofReceived EOF was received. Remember it.
Method extReceived Extended data was received. Store it in the buffer.
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 Opening the channel failed. Store the reason why.
Method request_test A test request. Return True if data is 'data'.
Class Variable name Undocumented
Instance Variable extBuffer a list of 2-tuples (type, extended data) of received by the channel.
Instance Variable gotClosed True if the channel is closed.
Instance Variable gotEOF True if the other side sent EOF.
Instance Variable gotOneClose True if the other side closed the connection.
Instance Variable gotOpen True if channelOpen has been called.
Instance Variable inBuffer a list of strings received by the channel.
Instance Variable numberRequests the number of requests that have been made to this channel.
Instance Variable openFailureReason the reason passed to openFailed.
Instance Variable specificData 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 addWindowBytes Called when bytes are added to the remote window. By default it clears the data buffers.
Method getHost See: ITransport.getHost
Method getPeer See: ITransport.getPeer
Method loseConnection Close the channel if there is no buferred data. Otherwise, note the request and return.
Method requestReceived 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 startWriting Called when the remote buffer has more room, as a hint to continue writing.
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 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.
Instance Variable areWriting 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 extBuf Undocumented
Instance Variable id Undocumented
Instance Variable localClosed True if we aren't accepting more data.
Instance Variable localMaxPacket the maximum size of packet we will accept in bytes.
Instance Variable localWindowLeft how many bytes are left in the local window.
Instance Variable localWindowSize the maximum size of the local window in bytes.
Instance Variable remoteClosed True if the other side isn't accepting more data.
Instance Variable remoteMaxPacket the maximum size of a packet the remote side will accept in bytes.
Instance Variable remoteWindowLeft how many bytes are left in the remote window.
Class Variable _log Undocumented
def channelOpen(self, specificData): (source)

The channel is open. Set up the instance variables.

def closed(self): (source)

The channel is closed. Rembember it.

def closeReceived(self): (source)

Close was received. Remember it.

def dataReceived(self, data): (source)

Data was received. Store it in the buffer.

def eofReceived(self): (source)

EOF was received. Remember it.

def extReceived(self, code, data): (source)

Extended data was received. Store it in the buffer.

def logPrefix(self): (source)

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.

def openFailed(self, reason): (source)

Opening the channel failed. Store the reason why.

def request_test(self, data): (source)

A test request. Return True if data is 'data'.

Parameters
data:bytesUndocumented
extBuffer: list = (source)

a list of 2-tuples (type, extended data) of received by the channel.

gotClosed: bool = (source)

True if the channel is closed.

True if the other side sent EOF.

gotOneClose: bool = (source)

True if the other side closed the connection.

True if channelOpen has been called.

inBuffer: list = (source)

a list of strings received by the channel.

numberRequests: int = (source)

the number of requests that have been made to this channel.

openFailureReason = (source)

the reason passed to openFailed.

specificData: bytes = (source)

the specific channel open data passed to channelOpen.