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`.`tcp`.`_BaseTCPClient``

class documentation

`class _BaseTCPClient: (source)`

Known subclasses: `twisted.internet.iocpreactor.tcp.Client`, `twisted.internet.tcp.Client`

View In Hierarchy

Code shared with other (non-POSIX) reactors for management of outgoing TCP connections (both TCPv4 and TCPv6).

Note
In order to be functional, this class must be mixed into the same hierarchy as `_BaseBaseClient`. It would subclass `_BaseBaseClient` directly, but the class hierarchy here is divided in strange ways out of the need to share code along multiple axes; specifically, with the IOCP reactor and also with UNIX clients in other reactors.

Method | `__init__` | Undocumented
Method | `__repr__` | Undocumented
Method | `getHost` | Returns an `IPv4Address` or `IPv6Address`.
Method | `getPeer` | Returns an `IPv4Address` or `IPv6Address`.
Instance Variable | `addr` | The address that this socket will be connecting to.
Instance Variable | `connector` | The `Connector` which is driving this `_BaseTCPClient`'s connection attempt.
Instance Variable | `createInternetSocket` | Subclasses must implement this as a method to create a python socket object of the appropriate address family and socket type.
Instance Variable | `_addressType` | The Twisted _IPAddress implementation for this client
Instance Variable | `_requiresResolution` | Undocumented

def __init__(self, host, port, bindAddress, connector, reactor=None): (source)
overridden in `twisted.internet.iocpreactor.tcp.Client`, `twisted.internet.ssl.Client`

Undocumented

def __repr__(self): (source)

Undocumented

Returns
`str` | Undocumented

def getHost(self): (source)

Returns an `IPv4Address` or `IPv6Address`.

This indicates the address from which I am connecting.

def getPeer(self): (source)

Returns an `IPv4Address` or `IPv6Address`.

This indicates the address that I am connected to.

addr: If IPv4, a 2-`tuple` of `(str host, int port)`. If IPv6, a 4-`tuple` of (`str host, int port, int ignored, int scope`). = (source)

The address that this socket will be connecting to.

connector = (source)

The `Connector` which is driving this `_BaseTCPClient`'s connection attempt.

createInternetSocket: 0-argument callable returning `socket._socketobject`. = (source)
overridden in `twisted.internet.iocpreactor.tcp.Client`

Subclasses must implement this as a method to create a python socket object of the appropriate address family and socket type.

_addressType: `IPv4Address` or `IPv6Address` = (source)

The Twisted _IPAddress implementation for this client

_requiresResolution: `bool` = (source)

Undocumented