interface documentation

class ITelnetProtocol(iinternet.IProtocol): (source)

Known implementations: twisted.conch.telnet.TelnetProtocol

View In Hierarchy

Undocumented

Method disable​Local Disable the given option locally.
Method disable​Remote Indicate that the peer has disabled this option.
Method enable​Local Enable the given option locally.
Method enable​Remote Indicate whether the peer should be allowed to enable this option.
Method unhandled​Command A command was received but not understood.
Method unhandled​Subnegotiation A subnegotiation command was received but not understood.

Inherited from IProtocol:

Method connection​Lost Called when the connection is shut down.
Method connection​Made Called when a connection is made.
Method data​Received Called whenever data is received.
Method make​Connection Make a connection to a transport and a server.
def disableLocal(option): (source)

Disable the given option locally.

Unlike enableLocal, this method cannot fail. The option must be disabled.

Parameters
option:bytes, a single character.the option to be disabled.
def disableRemote(option): (source)
Indicate that the peer has disabled this option.
Parameters
option:bytes, a single character.the option to be disabled.
def enableLocal(option): (source)

Enable the given option locally.

This should enable the given option on this side of the telnet connection and return True. If False is returned, the option will be treated as still disabled and the peer will be notified.

Parameters
option:bytes, a single character.the option to be enabled.
def enableRemote(option): (source)

Indicate whether the peer should be allowed to enable this option.

Returns True if the peer should be allowed to enable this option, False otherwise.

Parameters
option:bytes, a single character.the option to be enabled.
def unhandledCommand(command, argument): (source)
A command was received but not understood.
Parameters
command:str, a single character.the command received.
argument:str, a single character, or None if the command that was unhandled does not provide an argument.the argument to the received command.
def unhandledSubnegotiation(command, data): (source)
A subnegotiation command was received but not understood.
Parameters
command:str, a single character.the command being subnegotiated. That is, the first byte after the SB command.
data:bytes, each a single characterall other bytes of the subneogation. That is, all but the first bytes between SB and SE, with IAC un-escaping applied.