ó
    Ö›‘h±  ã                   ó    • S r SSKJr  SSKJrJr  SSKJrJrJ	r	   " S S5      r
\" \R                  5       " S S\R                  5      5       rg	)
z´
Lookup a name using multiple resolvers.

Future Plans: This needs someway to specify which resolver answered
the query, or someway to specify (authority|ttl|cache behavior|more?)
é    )Úimplementer)ÚdeferÚ
interfaces)ÚcommonÚdnsÚerrorc                   ó    • \ rS rSrS rS rSrg)ÚFailureHandleré   c                 ó(   • Xl         X l        X0l        g ©N)ÚresolverÚqueryÚtimeout)Úselfr   r   r   s       ÚYC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/names/resolve.pyÚ__init__ÚFailureHandler.__init__   s   € Ø ŒØŒ
Ø�ó    c                 ó´   • UR                  [        R                  [        R                  [
        5        U R                  U R                  U R                  5      $ r   )	Útrapr   ÚDomainErrorr   ÚTimeoutErrorÚNotImplementedErrorr   r   r   )r   Úfailures     r   Ú__call__ÚFailureHandler.__call__   s6   € à�‰”S—_‘_¤e×&8Ñ&8Ô:MÔNØ�}‰}˜TŸZ™Z¨¯©Ó6Ð6r   )r   r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   Ú__static_attributes__© r   r   r
   r
      s   † òõ
7r   r
   c                   ó.   • \ rS rSrSrS rS rSS jrSrg)	ÚResolverChainé   z0
Lookup an address using multiple L{IResolver}s
c                 óN   • [         R                  R                  U 5        Xl        g)zQ
@type resolvers: L{list}
@param resolvers: A L{list} of L{IResolver} providers.
N)r   ÚResolverBaser   Ú	resolvers)r   r)   s     r   r   ÚResolverChain.__init__%   s   € ô
 	×Ñ×$Ñ$ TÔ*Ø"�r   c                 óZ  • U R                   (       d)  [        R                  " [        R                  " 5       5      $ [
        R                  " XU5      nU R                   S   R                  XT5      nU R                   SS  H(  nUR                  [        UR                  XT5      5      nM*     U$ )a¦  
Build a L{dns.Query} for the given parameters and dispatch it
to each L{IResolver} in C{self.resolvers} until an answer or
L{error.AuthoritativeDomainError} is returned.

@type name: C{str}
@param name: DNS name to resolve.

@type type: C{int}
@param type: DNS record type.

@type cls: C{int}
@param cls: DNS record class.

@type timeout: Sequence of C{int}
@param timeout: Number of seconds after which to reissue the query.
    When the last timeout expires, the query is considered failed.

@rtype: L{Deferred}
@return: A L{Deferred} which fires with a three-tuple of lists of
    L{twisted.names.dns.RRHeader} instances.  The first element of the
    tuple gives answers.  The second element of the tuple gives
    authorities.  The third element of the tuple gives additional
    information.  The L{Deferred} may instead fail with one of the
    exceptions defined in L{twisted.names.error} or with
    C{NotImplementedError}.
r   é   N)
r)   r   Úfailr   r   r   ÚQueryr   Ú
addErrbackr
   )r   ÚnameÚclsÚtyper   ÚqÚdÚrs           r   Ú_lookupÚResolverChain._lookup-   s   € ð8 �~�~Ü—:’:œe×/Ò/Ó1Ó2Ð2Ü�IŠI�d #Ó&ˆØ�N‰N˜1Ñ×#Ñ# AÓ/ˆØ—‘  Ó#ˆAØ—‘œ^¨A¯G©G°QÓ@ÓAŠAñ $àˆr   Nc                 ó,  • U R                   (       d)  [        R                  " [        R                  " 5       5      $ U R                   S   R                  X5      nU R                   SS   H(  nUR                  [        UR
                  X5      5      nM*     U$ )Nr   r,   )r)   r   r-   r   r   ÚlookupAllRecordsr/   r
   )r   r0   r   r4   r5   s        r   r9   ÚResolverChain.lookupAllRecordsQ   sq   € ð
 �~�~Ü—:’:œe×/Ò/Ó1Ó2Ð2Ø�N‰N˜1Ñ×.Ñ.¨tÓ=ˆØ—‘  Ó#ˆAØ—‘œ^¨A×,>Ñ,>ÀÓNÓOŠAñ $àˆr   )r)   r   )	r   r   r    r!   Ú__doc__r   r6   r9   r"   r#   r   r   r%   r%      s   † ñò#ò"÷H
r   r%   N)r;   Úzope.interfacer   Útwisted.internetr   r   Útwisted.namesr   r   r   r
   Ú	IResolverr(   r%   r#   r   r   Ú<module>r@      sN   ðñ
õ 'ç .ß ,Ñ ,÷	7ñ 	7ñ ˆZ×!Ñ!Ó"ô;�F×'Ñ'ó ;ó #ñ;r   