![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/twisted/names/__pycache__/ |
o �b�# � @ sv d dl Z d dlmZ d dlmZmZ d dlmZmZ d dl m Z d dlmZ G dd� d�Z eej�G d d � d ��ZdS )� N)�implementer)�error� interfaces)�client�dns)�DNSNameError)�nativeStringc @ s4 e Zd Zdd� Zdd� Zdd� Zdd� Zd d � ZdS )�"_SRVConnector_ClientFactoryWrapperc C s || _ || _d S �N)�-_SRVConnector_ClientFactoryWrapper__connector�2_SRVConnector_ClientFactoryWrapper__wrappedFactory)�self� connector�wrappedFactory� 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 �connectionFailed�r 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 dfdd�Zd 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)�reactor�servicer �domainString�domain�factory�protocol�connectFuncName�connectFuncArgs�connectFuncKwArgs�_defaultPortr �servers�orderedServers) r r% r&