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`.`internet`.`interfaces`.`IReactorTCP``

interface documentation

`class IReactorTCP(Interface): (source)`

Known implementations: `twisted.internet.iocpreactor.reactor.IOCPReactor`, `twisted.internet.posixbase.PosixReactorBase`, `twisted.internet.testing.MemoryReactor`, `twisted.internet.testing.RaisingMemoryReactor`

View In Hierarchy

Undocumented

Method | `connectTCP` | Connect a TCP client.
Method | `listenTCP` | Connects a given protocol factory to the given numeric TCP/IP port.

def connectTCP(host, port, factory, timeout, bindAddress): (source)

Connect a TCP client.

Parameters
host:`str` | A hostname or an IPv4 or IPv6 address literal.
port:`int` | a port number
factory:`ClientFactory` | a `twisted.internet.protocol.ClientFactory` instance
timeout:`float` | number of seconds to wait before assuming the connection has failed.
bindAddress:`Optional[Tuple[str, int]]` | a (host, port) tuple of local address to bind to, or None.
Returns
`IConnector` | An object which provides `IConnector`. This connector will call various callbacks on the factory when a connection is made, failed, or lost - see `ClientFactory` docs for details.

def listenTCP(port, factory, backlog, interface): (source)

Connects a given protocol factory to the given numeric TCP/IP port.

Parameters
port:`int` | a port number on which to listen
factory:`ServerFactory` | a `twisted.internet.protocol.ServerFactory` instance
backlog:`int` | size of the listen queue
interface:`str` | The local IPv4 or IPv6 address to which to bind; defaults to '', ie all IPv4 addresses. To bind to all IPv4 and IPv6 addresses, you must call this method twice.
Returns
`IListeningPort` | an object that provides `IListeningPort`.
Raises
`CannotListenError` | as defined here `twisted.internet.error.CannotListenError`, if it cannot listen on this port (e.g., it cannot bind to the required port number)