/usr/lib/python3/dist-packages/twisted/names/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/names/__pycache__/srvconnect.cpython-310.pyc (8697B)
o
b# @ sv d dl Z d dlmZ d dlmZmZ d dlmZmZ d dl m
Z
d dlmZ G dd dZ
eejG d d
d
ZdS ) N)implementer)error
interfaces)clientdns)DNSNameError)nativeStringc @ s4 e Zd Zdd Zdd Zdd Zdd Zd d
ZdS )"_SRVConnector_ClientFactoryWrapperc C s || _ || _d S N)-_SRVConnector_ClientFactoryWrapper__connector2_SRVConnector_ClientFactoryWrapper__wrappedFactory)self connectorwrappedFactory r :/usr/lib/python3/dist-packages/twisted/names/srvconnect.py__init__ s
z+_SRVConnector_ClientFactoryWrapper.__init__c C s | j | j d S r
)r startedConnectingr )r
r r r r r s z4_SRVConnector_ClientFactoryWrapper.startedConnectingc C | j | d S r
)r connectionFailedr
r reasonr r r clientConnectionFailed z9_SRVConnector_ClientFactoryWrapper.clientConnectionFailedc C r r
)r connectionLostr r r r clientConnectionLost r z7_SRVConnector_ClientFactoryWrapper.clientConnectionLostc C s t | j|S r
)getattrr )r
keyr r r __getattr__ s z._SRVConnector_ClientFactoryWrapper.__getattr__N)__name__
__module____qualname__r r r r r r r r r r s r c @ s e Zd ZdZdZdddi dfddZd d
Zdd Zd
d Zdd Z dd Z
dd Zdd Zdd Z
dd Zdd Zdd ZdS )SRVConnectoraD
A connector that looks up DNS SRV records.
RFC 2782 details how SRV records should be interpreted and selected
for subsequent connection attempts. The algorithm for using the records'
priority and weight is implemented in L{pickServer}.
@ivar servers: List of candidate server records for future connection
attempts.
@type servers: L{list} of L{dns.Record_SRV}
@ivar orderedServers: List of server records that have already been tried
in this round of connection attempts.
@type orderedServers: L{list} of L{dns.Record_SRV}
r tcp
connectTCPr Nc
C s^ || _ || _|du rdnt|| _|| _|| _|| _|| _|| _ | | _
d| _d| _d| _
dS )a
@param domain: The domain to connect to. If passed as a text
string, it will be encoded using C{idna} encoding.
@type domain: L{bytes} or L{str}
@param defaultPort: Optional default port number to be used when SRV
lookup fails and the service name is unknown. This should be the
port number associated with the service name as defined by the IANA
registry.
@type defaultPort: L{int}
N)reactorservicer domainStringdomainfactoryprotocolconnectFuncNameconnectFuncArgsconnectFuncKwArgs_defaultPortr serversorderedServers)
r
r% r&