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

Instance Variable gotOpen True if channelOpen has been called. (type: bool)
Instance Variable specificData the specific channel open data passed to channelOpen. (type: bytes)
Instance Variable openFailureReason the reason passed to openFailed.
Instance Variable inBuffer a list of strings received by the channel. (type: list)
Instance Variable extBuffer a list of 2-tuples (type, extended data) of received by the channel. (type: list)
Instance Variable numberRequests the number of requests that have been made to this channel. (type: int)
Instance Variable gotEOF True if the other side sent EOF. (type: bool)
Instance Variable gotOneClose True if the other side closed the connection. (type: bool)
Instance Variable gotClosed True if the channel is closed. (type: bool)
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 channelOpen The channel is open. Set up the instance variables.
Method openFailed Opening the channel failed. Store the reason why.
Method request_test A test request. Return True if data is 'data'.
Method dataReceived Data was received. Store it in the buffer.
Method extReceived Extended data was received. Store it in the buffer.
Method eofReceived EOF was received. Remember it.
Method closeReceived Close was received. Remember it.
Method closed The channel is closed. Rembember it.

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 side 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 side isn't accepting more data. (type: bool)
Method __init__ Undocumented
Method __str__ Undocumented
Method __bytes__ Return a byte string representation of the channel
Method addWindowBytes Called when bytes are added to the remote window. By default it clears the data buffers.
Method requestReceived No summary
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.
gotOpen =
True if channelOpen has been called. (type: bool)
specificData =
the specific channel open data passed to channelOpen. (type: bytes)
openFailureReason =
the reason passed to openFailed.
inBuffer =
a list of strings received by the channel. (type: list)
extBuffer =
a list of 2-tuples (type, extended data) of received by the channel. (type: list)
numberRequests =
the number of requests that have been made to this channel. (type: int)
gotEOF =
True if the other side sent EOF. (type: bool)
gotOneClose =
True if the other side closed the connection. (type: bool)
gotClosed =
True if the channel is closed. (type: bool)
def logPrefix(self):

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 channelOpen(self, specificData):

The channel is open. Set up the instance variables.

def openFailed(self, reason):

Opening the channel failed. Store the reason why.

def request_test(self, data):

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

def dataReceived(self, data):

Data was received. Store it in the buffer.

def extReceived(self, code, data):

Extended data was received. Store it in the buffer.

def eofReceived(self):

EOF was received. Remember it.

def closeReceived(self):

Close was received. Remember it.

def closed(self):

The channel is closed. Rembember it.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.