Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`conch`.`telnet`.`Telnet``

class documentation

`class Telnet(protocol.Protocol): (source)`

Known subclasses: `twisted.conch.telnet.TelnetTransport`

View In Hierarchy

Method | `__init__` | Undocumented
Method | `applicationDataReceived` | Called with application-level data.
Method | `commandReceived` | Undocumented
Method | `connectionLost` | Called when the connection is shut down.
Method | `dataReceived` | Called whenever data is received.
Method | `disableLocal` | Signal a programming error by raising an exception.
Method | `disableRemote` | Signal a programming error by raising an exception.
Method | `do` | Undocumented
Method | `do_no_false` | Undocumented
Method | `do_no_true` | Undocumented
Method | `do_yes_false` | Undocumented
Method | `do_yes_true` | Undocumented
Method | `dont` | Undocumented
Method | `dont_no_false` | Undocumented
Method | `dont_no_true` | Undocumented
Method | `dont_yes_false` | Undocumented
Method | `dont_yes_true` | Undocumented
Method | `enableLocal` | Reject all attempts to enable options.
Method | `enableRemote` | Reject all attempts to enable options.
Method | `getOptionState` | Undocumented
Method | `negotiate` | Undocumented
Method | `requestNegotiation` | Send a negotiation message for the option `about` with `data` as the payload.
Method | `telnet_DO` | Undocumented
Method | `telnet_DONT` | Undocumented
Method | `telnet_WILL` | Undocumented
Method | `telnet_WONT` | Undocumented
Method | `unhandledCommand` | Called for commands for which no handler is installed.
Method | `unhandledSubnegotiation` | Called for subnegotiations for which no handler is installed.
Method | `will` | Indicate our willingness to enable an option.
Method | `will_no_false` | Undocumented
Method | `will_no_true` | Undocumented
Method | `will_yes_false` | Undocumented
Method | `will_yes_true` | Undocumented
Method | `wont` | Indicate we are not willing to enable an option.
Method | `wont_no_false` | Undocumented
Method | `wont_no_true` | Undocumented
Method | `wont_yes_false` | Undocumented
Method | `wont_yes_true` | Undocumented
Class Variable | `doMap` | Undocumented
Class Variable | `dontMap` | Undocumented
Class Variable | `willMap` | Undocumented
Class Variable | `wontMap` | Undocumented
Instance Variable | `commandMap` | A mapping of bytes to callables. When a telnet command is received, the command byte (the first byte after IAC) is looked up in this dictionary. If a callable is found, it is invoked with the argument of the command, or None if the command takes no argument...
Instance Variable | `negotiationMap` | A mapping of bytes to callables. When a subnegotiation command is received, the command byte (the first byte after SB) is looked up in this dictionary. If a callable is found, it is invoked with the argument of the subnegotiation...
Instance Variable | `options` | A mapping of option bytes to their current state. This state is likely of little use to user code. Changes should not be made to it.
Instance Variable | `state` | A string indicating the current parse state. It can take on the values "data", "escaped", "command", "newline", "subnegotiation", and "subnegotiation-escaped". Changes should not be made to it.
Instance Variable | `transport` | This protocol's transport object.
Class | `_OptionState` | Represents the state of an option on both sides of a telnet connection.
Method | `_do` | Undocumented
Method | `_dont` | Undocumented
Method | `_will` | Undocumented
Method | `_wont` | Undocumented
Method | `_write` | Undocumented

Inherited from `Protocol`:

Method | `logPrefix` | Return a prefix matching the class name, to identify log messages related to this protocol instance.
Class Variable | `factory` | Undocumented

Inherited from `BaseProtocol` (via `Protocol`):

Method | `connectionMade` | Called when a connection is made.
Method | `makeConnection` | Make a connection to a transport and a server.
Instance Variable | `connected` | Undocumented

def __init__(self): (source)
overridden in `twisted.conch.telnet.TelnetTransport`

Undocumented

def applicationDataReceived(self, data): (source)
overridden in `twisted.conch.telnet.TelnetTransport`

Called with application-level data.

def commandReceived(self, command, argument): (source)

Undocumented

def connectionLost(self, reason): (source)
from `twisted.internet.interfaces.IProtocol`
overrides `twisted.internet.protocol.Protocol.connectionLost`
overridden in `twisted.conch.telnet.TelnetTransport`

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.

Parameters
reason:`twisted.python.failure.Failure` | Undocumented

def dataReceived(self, data): (source)
from `twisted.internet.interfaces.IProtocol`
overrides `twisted.internet.protocol.Protocol.dataReceived`

Called whenever data is received.

Use this method to translate to a higher-level message. Usually, some callback will be made upon the receipt of each complete protocol message.

Parameters
data | a string of indeterminate length. Please keep in mind that you will probably need to buffer some data, as partial (or multiple) protocol messages may be received! I recommend that unit tests for protocols call through to this method with differing chunk sizes, down to one byte at a time.

def disableLocal(self, option): (source)
overridden in `twisted.conch.telnet.TelnetTransport`

Signal a programming error by raising an exception.

`enableLocal` must return true for the given value of `option` in order for this method to be called. If a subclass of `Telnet` overrides enableLocal to allow certain options to be enabled, it must also override disableLocal to disable those options.

Raises
`NotImplementedError` | Always raised.

def disableRemote(self, option): (source)
overridden in `twisted.conch.telnet.TelnetTransport`

Signal a programming error by raising an exception.

`enableRemote` must return true for the given value of `option` in order for this method to be called. If a subclass of `Telnet` overrides enableRemote to allow certain options to be enabled, it must also override disableRemote tto disable those options.

Raises
`NotImplementedError` | Always raised.

def do(self, option): (source)

Undocumented

def do_no_false(self, state, option): (source)

Undocumented

def do_no_true(self, state, option): (source)

Undocumented

def do_yes_false(self, state, option): (source)

Undocumented

def do_yes_true(self, state, option): (source)

Undocumented

def dont(self, option): (source)

Undocumented

def dont_no_false(self, state, option): (source)

Undocumented

def dont_no_true(self, state, option): (source)

Undocumented

def dont_yes_false(self, state, option): (source)

Undocumented

def dont_yes_true(self, state, option): (source)

Undocumented

def enableLocal(self, option): (source)
overridden in `twisted.conch.telnet.TelnetTransport`

Reject all attempts to enable options.

def enableRemote(self, option): (source)
overridden in `twisted.conch.telnet.TelnetTransport`

Reject all attempts to enable options.

def getOptionState(self, opt): (source)

Undocumented

def negotiate(self, data): (source)

Undocumented

def requestNegotiation(self, about, data): (source)

Send a negotiation message for the option `about` with `data` as the payload.

Parameters
about | Undocumented
data:`bytes` | the payload
See Also
`ITelnetTransport.requestNegotiation`

def telnet_DO(self, option): (source)

Undocumented

def telnet_DONT(self, option): (source)

Undocumented

def telnet_WILL(self, option): (source)

Undocumented

def telnet_WONT(self, option): (source)

Undocumented

def unhandledCommand(self, command, argument): (source)
overridden in `twisted.conch.telnet.TelnetTransport`

Called for commands for which no handler is installed.

def unhandledSubnegotiation(self, command, data): (source)
overridden in `twisted.conch.telnet.TelnetTransport`

Called for subnegotiations for which no handler is installed.

def will(self, option): (source)

Indicate our willingness to enable an option.

def will_no_false(self, state, option): (source)

Undocumented

def will_no_true(self, state, option): (source)

Undocumented

def will_yes_false(self, state, option): (source)

Undocumented

def will_yes_true(self, state, option): (source)

Undocumented

def wont(self, option): (source)

Indicate we are not willing to enable an option.

def wont_no_false(self, state, option): (source)

Undocumented

def wont_no_true(self, state, option): (source)

Undocumented

def wont_yes_false(self, state, option): (source)

Undocumented

def wont_yes_true(self, state, option): (source)

Undocumented

doMap = (source)

Undocumented

dontMap = (source)

Undocumented

willMap = (source)

Undocumented

wontMap = (source)

Undocumented

commandMap = (source)

A mapping of bytes to callables. When a telnet command is received, the command byte (the first byte after IAC) is looked up in this dictionary. If a callable is found, it is invoked with the argument of the command, or None if the command takes no argument. Values should be added to this dictionary if commands wish to be handled. By default, only WILL, WONT, DO, and DONT are handled. These should not be overridden, as this class handles them correctly and provides an API for interacting with them.

negotiationMap: `dict` = (source)

A mapping of bytes to callables. When a subnegotiation command is received, the command byte (the first byte after SB) is looked up in this dictionary. If a callable is found, it is invoked with the argument of the subnegotiation. Values should be added to this dictionary if subnegotiations are to be handled. By default, no values are handled.

options: `dict` = (source)

A mapping of option bytes to their current state. This state is likely of little use to user code. Changes should not be made to it.

state: `str` = (source)

A string indicating the current parse state. It can take on the values "data", "escaped", "command", "newline", "subnegotiation", and "subnegotiation-escaped". Changes should not be made to it.

transport = (source)
overrides `twisted.internet.protocol.BaseProtocol.transport`

This protocol's transport object.

def _do(self, option): (source)

Undocumented

def _dont(self, option): (source)

Undocumented

def _will(self, option): (source)

Undocumented

def _wont(self, option): (source)

Undocumented

def _write(self, data): (source)

Undocumented