twisted.internet.endpoints.HostnameEndpoint(object)
class documentationtwisted.internet.endpoints
View Source
(View In Hierarchy)
Implements interfaces: twisted.internet.interfaces.IStreamClientEndpoint
A name-based endpoint that connects to the fastest amongst the resolved host addresses.
Method | __init__ | |
Method | connect | Attempts a connection to each address returned by gai, and returns a connection which is established first. |
Instance Variable | _getaddrinfo | A hook used for testing name resolution. |
Instance Variable | _deferToThread | A hook used for testing deferToThread. |
Method | _nameResolution | Resolve the hostname string into a tuple containig the host address. |
Parameters | host | A hostname to connect to. (type: bytes ) |
timeout | For each individual connection attempt, the number of seconds to wait
before assuming the connection has failed. (type: int ) | |
See Also | twisted.internet.interfaces.IReactorTCP.connectTCP |
Attempts a connection to each address returned by gai, and returns a connection which is established first.
Resolve the hostname string into a tuple containig the host address.