§
    Ètºf­»  ã            
       ót  — U d Z ddlZddlZddlZddlmZmZ ddlmZm	Z	m
Z
 ddlmZ ddlmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZ ddlmZmZ dd	lm Z m!Z!m"Z"m#Z#m$Z$m%Z% dd
l&m'Z(m)Z*m+Z, ddl-m.Z.m/Z/ ddl0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z? ddl@mAZA ddlBmCZC ddlDmEZE ddlFmGZG ddlHmIZJ ddlKmLZLmMZN ddlOmPZPmQZQmRZR erddlSmTZT ddlDmUZU  eLjV        ¦   «         rddlWmXZX ndZX eC¦   «         ZYeY Z                    d¦  «        Z[eY Z                    d¦  «        Z\eY Z                    d¦  «        Z] ee3¦  «         G d„ d¦  «        ¦   «         Z^ ee=¦  «         G d„ d¦  «        ¦   «         Z_ ee=¦  «         G d„ d ¦  «        ¦   «         Z`ed!ef         Zaeeaeebd!f         eecebf         f         Zd ed"eeceaeebd!f         eecebf         f         ¦  «        Ze G d#„ d$¦  «        Zf ee8e9¦  «         G d%„ d&¦  «        ¦   «         Zg ed'eeceef         ¦  «        Zheed!ef         eebd!f         eecebf         f         Zi ee6e;e?¦  «         G d(„ d)eg¦  «        ¦   «         Zj eLjV        ¦   «         r eeje:¦  «          ee2¦  «         G d*„ d+e¦  «        ¦   «         Zk G d,„ d-e jl        ¦  «        Zmg Zneec         eod.<   dS )/z8
Very basic functionality for a Reactor implementation.
é    N)ÚABCÚabstractmethod)ÚheapifyÚheappopÚheappush)Úformat_stack)Ú	FrameType)ÚTYPE_CHECKINGÚAnyÚCallableÚDictÚListÚNewTypeÚOptionalÚSequenceÚSetÚTupleÚUnionÚcast)ÚclassImplementsÚimplementer)ÚabstractÚdeferÚerrorÚfdescÚmainÚthreads)ÚComplexResolverSimplifierÚGAIResolverÚSimpleResolverComplexifier)ÚDeferredÚDeferredList)ÚIAddressÚ
IConnectorÚIDelayedCallÚIHostnameResolverÚ	IProtocolÚIReactorCoreÚIReactorFromThreadsÚIReactorPluggableNameResolverÚIReactorPluggableResolverÚIReactorThreadsÚIReactorTimeÚIReadDescriptorÚIResolverSimpleÚIWriteDescriptorÚ_ISupportsExitSignalCapturing)ÚClientFactory)ÚLogger)Úreflect)ÚFailure)ÚcallWithLogger)ÚplatformÚsecondsé   )ÚSignalHandlingÚ_WithoutSignalHandlingÚ_WithSignalHandling)ÚClient)Ú
threadable)Ú
ThreadPoolzUnexpected error in main loopzwhile calling from threadz*While calling system event trigger handlerc                   óT  — e Zd ZU dZdZee         ed<   dZee	e                  ed<   e
fdededef         de	e         d	eeef         d
ed gdf         ded gdf         deg ef         ddfd„Zdefd„Zdd„Zdeddfd„Zdeddfd„Zdd„Zdefd„Zdedefd„Zdedefd„Zdefd„ZdS )ÚDelayedCallFNÚ_reprÚcreatorÚtimeÚfunc.ÚargsÚkwÚcancelÚresetr8   Úreturnc                 óà   — ||||f\  | _         | _        | _        | _        || _        || _        || _        dx| _        | _        d| _	        | j
        rt          ¦   «         dd…         | _        dS dS )aR  
        @param time: Seconds from the epoch at which to call C{func}.
        @param func: The callable to call.
        @param args: The positional arguments to pass to the callable.
        @param kw: The keyword arguments to pass to the callable.
        @param cancel: A callable which will be called with this
            DelayedCall before cancellation.
        @param reset: A callable which will be called with this
            DelayedCall after changing this DelayedCall's scheduled
            execution time. The callable should adjust any necessary
            scheduling details to ensure this DelayedCall is invoked
            at the new appropriate time.
        @param seconds: If provided, a no-argument callable which will be
            used to determine the current time any time that information is
            needed.
        r   ç        Néþÿÿÿ)rD   rE   rF   rG   ÚresetterÚ	cancellerr8   Ú	cancelledÚcalledÚdelayed_timeÚdebugr   rC   )ÚselfrD   rE   rF   rG   rH   rI   r8   s           úT/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/internet/base.pyÚ__init__zDelayedCall.__init__a   sz   € ð4 48¸¸tÀRÐ3GÑ0ˆŒ	�4”9˜dœi¨¬ØˆŒØˆŒØˆŒØ'(Ð(ˆŒ˜œØˆÔØŒ:ð 	/Ý'™>œ>¨#¨2¨#Ô.ˆDŒLˆLˆLð	/ð 	/ó    c                 ó    — | j         | j        z   S )z®
        Return the time at which this call will fire

        @return: The number of seconds after the epoch at which this call is
            scheduled to be made.
        ©rD   rR   ©rT   s    rU   ÚgetTimezDelayedCall.getTime„   s   € ð Œy˜4Ô,Ñ,Ð,rW   c                 óÌ   — | j         rt          j        ‚| j        rt          j        ‚|                      | ¦  «         d| _         | j        rt          | ¦  «        | _        | `	| `
| `dS )zÐ
        Unschedule this call

        @raise AlreadyCancelled: Raised if this call has already been
            unscheduled.

        @raise AlreadyCalled: Raised if this call has already been made.
        r9   N)rP   r   ÚAlreadyCancelledrQ   ÚAlreadyCalledrO   rS   ÚreprrB   rE   rF   rG   rZ   s    rU   rH   zDelayedCall.cancel�   sk   € ð Œ>ð 		.ÝÔ(Ð(ØŒ[ð 	.ÝÔ%Ð%à�NŠN˜4Ñ Ô Ð ØˆDŒNØŒzð (Ý! $™ZœZ�”
Ø�	˜4˜9 d g g grW   ÚsecondsFromNowc                 óþ   — | j         rt          j        ‚| j        rt          j        ‚|                      ¦   «         |z   }|| j        k     r%d| _        || _        |                      | ¦  «         dS || j        z
  | _        dS )aY  
        Reschedule this call for a different time

        @param secondsFromNow: The number of seconds from the time of the
            C{reset} call at which this call will be scheduled.

        @raise AlreadyCancelled: Raised if this call has been cancelled.
        @raise AlreadyCalled: Raised if this call has already been made.
        rL   N)	rP   r   r]   rQ   r^   r8   rD   rR   rN   )rT   r`   ÚnewTimes      rU   rI   zDelayedCall.reset¡   s…   € ð Œ>ð 	8ÝÔ(Ð(ØŒ[ð 		8ÝÔ%Ð%à—l’l‘n”n ~Ñ5ˆGØ˜œÒ"Ð"Ø$'�Ô!Ø#�”	Ø—’˜dÑ#Ô#Ð#Ð#Ð#à$+¨d¬iÑ$7�Ô!Ð!Ð!rW   ÚsecondsLaterc                 óÞ   — | j         rt          j        ‚| j        rt          j        ‚| xj        |z  c_        | j        dk     r+|                      ¦   «          |                      | ¦  «         dS dS )aQ  
        Reschedule this call for a later time

        @param secondsLater: The number of seconds after the originally
            scheduled time for which to reschedule this call.

        @raise AlreadyCancelled: Raised if this call has been cancelled.
        @raise AlreadyCalled: Raised if this call has already been made.
        rL   N)rP   r   r]   rQ   r^   rR   Úactivate_delayrN   )rT   rc   s     rU   ÚdelayzDelayedCall.delay¸   s~   € ð Œ>ð 	$ÝÔ(Ð(ØŒ[ð 	$ÝÔ%Ð%àÐÔ Ñ-ÐÔØÔ  3Ò&Ð&Ø×#Ò#Ñ%Ô%Ð%Ø—’˜dÑ#Ô#Ð#Ð#Ð#ð 'Ð&rW   c                 ó>   — | xj         | j        z  c_         d| _        d S )NrL   rY   rZ   s    rU   re   zDelayedCall.activate_delayÌ   s#   € Øˆ	Œ	�TÔ&Ñ&ˆ	Œ	ØˆÔÐÐrW   c                 ó    — | j         p| j         S )zšDetermine whether this call is still pending

        @return: True if this call has not yet been made or cancelled,
            False otherwise.
        )rP   rQ   rZ   s    rU   ÚactivezDelayedCall.activeÐ   s   € ð ”NÐ1 d¤kÐ2Ð2rW   Úotherc                 óZ   — t          |t          ¦  «        r| j        |j        k    S t          S )z°
        Implement C{<=} operator between two L{DelayedCall} instances.

        Comparison is based on the C{time} attribute (unadjusted by the
        delayed time).
        ©Ú
isinstancerA   rD   ÚNotImplemented©rT   rj   s     rU   Ú__le__zDelayedCall.__le__Ø   s+   € õ �e�[Ñ)Ô)ð 	"Ø”9 ¤
Ò*Ð*å!Ð!rW   c                 óZ   — t          |t          ¦  «        r| j        |j        k     S t          S )z¯
        Implement C{<} operator between two L{DelayedCall} instances.

        Comparison is based on the C{time} attribute (unadjusted by the
        delayed time).
        rl   ro   s     rU   Ú__lt__zDelayedCall.__lt__ä   s+   € õ �e�[Ñ)Ô)ð 	"Ø”9˜uœzÒ)Ð)å!Ð!rW   c                 ó  — | j         �| j         S t          | d¦  «        rkt          | j        dd¦  «        }|€7t          | j        dd¦  «        }|�t          | j        dd¦  «        }|�|› d|› �}|€t	          j        | j        ¦  «        }nd}|                      ¦   «         }dt          | ¦  «        | j        |z
  | j	        | j
        fz  g}|�×|                     d|d	f¦  «         | j        rS|                     d
                     d„ | j        D ¦   «         ¦  «        ¦  «         | j        r|                     d
¦  «         | j        rI|                     d
                     d„ | j                             ¦   «         D ¦   «         ¦  «        ¦  «         |                     d¦  «         | j        �0|                     dd                     | j        ¦  «        z  ¦  «         |                     d¦  «         d                     |¦  «        S )z‡
        Implement C{repr()} for L{DelayedCall} instances.

        @returns: String containing details of the L{DelayedCall}.
        NrE   Ú__qualname__Ú__name__Úim_classú.z.<DelayedCall 0x%x [%ss] called=%s cancelled=%sú ú(z, c                 ó6   — g | ]}t          j        |¦  «        ‘ŒS © ©r4   Ú	safe_repr)Ú.0Úes     rU   ú
<listcomp>z(DelayedCall.__repr__.<locals>.<listcomp>  s#   € Ð#LÐ#LÐ#L¸Q¥GÔ$5°aÑ$8Ô$8Ð#LÐ#LÐ#LrW   c                 óF   — g | ]\  }}|› d t          j        |¦  «        › �‘ŒS )ú=r|   )r~   ÚkÚvs      rU   r€   z(DelayedCall.__repr__.<locals>.<listcomp>  s5   € ÐUÐUÐU¹6¸A¸q˜AÐ6Ð6¥Ô 1°!Ñ 4Ô 4Ð6Ð6ÐUÐUÐUrW   ú)z

traceback at creation: 

%sz    ú>Ú )rB   ÚhasattrÚgetattrrE   r4   r}   r8   ÚidrD   rQ   rP   ÚextendrF   ÚappendÚjoinrG   ÚitemsrC   )rT   rE   ÚimClassÚnowÚLs        rU   Ú__repr__zDelayedCall.__repr__ð   sø  € ð Œ:Ð!Ø”:ÐÝ�4˜Ñ Ô ð 	õ ˜4œ9 n°dÑ;Ô;ˆDØˆ|Ý˜tœy¨*°dÑ;Ô;�ØÐ#Ý% d¤i°¸TÑBÔB�GØÐ*Ø")Ð2Ð2¨DÐ2Ð2˜Øˆ|ÝÔ(¨¬Ñ3Ô3�øàˆDà�lŠl‰nŒnˆà<Ý�$‰xŒx˜œ S™¨$¬+°t´~ÐFñGð
ˆð ÐØ�HŠH�c˜4 Ð%Ñ&Ô&Ð&ØŒyð #Ø—’˜ŸšÐ#LÐ#LÀ$Ä)Ð#LÑ#LÔ#LÑMÔMÑNÔNÐNØ”7ð #Ø—H’H˜T‘N”N�NØŒwð Ø—’Ø—I’IØUÐUÀTÄWÇ]Â]Á_Ä_ÐUÑUÔUñô ñô ð ð
 �HŠH�S‰MŒMˆMàŒ<Ð#Ø�HŠHÐ8¸F¿KºKÈÌÑ<UÔ<UÑVÑWÔWÐWØ	�Š�‰Œˆà�wŠw�q‰zŒzÐrW   ©rJ   N)ru   Ú
__module__rt   rS   rB   r   ÚstrÚ__annotations__rC   r   ÚruntimeSecondsÚfloatr   r   Úobjectr   rV   r[   rH   rI   rf   re   Úboolri   rp   rr   r’   r{   rW   rU   rA   rA   W   sò  € € € € € € ð €EØ€Eˆ8�CŒ=ÐÐÑð (,€GˆX�h˜s”mÔ$Ð+Ð+Ñ+ð (6ð!/ð !/àð!/ð �s˜C�xÔ ð!/ð �vÔð	!/ð
 ��f�Ôð!/ð ˜-˜¨$Ð.Ô/ð!/ð ˜˜¨Ð-Ô.ð!/ð ˜"˜e˜)Ô$ð!/ð 
ð!/ð !/ð !/ð !/ðF-˜ð -ð -ð -ð -ð.ð .ð .ð .ð(8 Eð 8¨dð 8ð 8ð 8ð 8ð.$ %ð $¨Dð $ð $ð $ð $ð( ð  ð  ð  ð3˜ð 3ð 3ð 3ð 3ð
"˜Fð 
" tð 
"ð 
"ð 
"ð 
"ð
"˜Fð 
" tð 
"ð 
"ð 
"ð 
"ð.˜#ð .ð .ð .ð .ð .ð .rW   rA   c                   ó²   — e Zd ZdZdd„Zdededefd	„Zded
ee         ddfd„Z	de
eef         ded
ee         ddfd„Z	 ddedee         dee         fd„ZdS )ÚThreadedResolvera·  
    L{ThreadedResolver} uses a reactor, a threadpool, and
    L{socket.gethostbyname} to perform name lookups without blocking the
    reactor thread.  It also supports timeouts indepedently from whatever
    timeout logic L{socket.gethostbyname} might have.

    @ivar reactor: The reactor the threadpool of which will be used to call
        L{socket.gethostbyname} and the I/O thread of which the result will be
        delivered.
    ÚreactorÚReactorBaserJ   Nc                 ó"   — || _         i | _        d S ©N)r�   Ú_runningQueries)rT   r�   s     rU   rV   zThreadedResolver.__init__.  s   € ØˆŒð ð 	ÔÐÐrW   ÚnameÚerrc                 óT   — t          j        d|›d|› �¦  «        }t          |¦  «        S )Núaddress z not found: )r   ÚDNSLookupErrorr5   )rT   r¢   r£   ÚlookupErrors       rU   Ú_failzThreadedResolver._fail4  s1   € ÝÔ*Ð+O°dÐ+OÐ+OÈ#Ð+OÐ+OÑPÔPˆÝ�{Ñ#Ô#Ð#rW   ÚlookupDeferredc                 óˆ   — | j         |         \  }}| j         |= |                     |                      |d¦  «        ¦  «         d S )Nztimeout error)r¡   Úerrbackr¨   )rT   r¢   r©   ÚuserDeferredÚ
cancelCalls        rU   Ú_cleanupzThreadedResolver._cleanup8  sG   € Ø#'Ô#7¸Ô#GÑ ˆ�jØÔ  Ð0Ø×Ò˜TŸZšZ¨¨oÑ>Ô>Ñ?Ô?Ð?Ð?Ð?rW   Úresultc                 óP  — 	 | j         |         \  }}| j         |= |                     ¦   «          t          |t          ¦  «        r=|                     |                      ||                     ¦   «         ¦  «        ¦  «         d S |                     |¦  «         d S # t          $ r Y d S w xY wr    )	r¡   rH   rm   r5   r«   r¨   ÚgetErrorMessageÚcallbackÚKeyError)rT   r¯   r¢   r©   r¬   r­   s         rU   Ú_checkTimeoutzThreadedResolver._checkTimeout=  s¼   € ð	.Ø'+Ô';¸NÔ'KÑ$ˆL˜*ð Ô$ ^Ð4Ø×ÒÑÔÐå˜&¥'Ñ*Ô*ð .Ø×$Ò$ T§Z¢Z°°f×6LÒ6LÑ6NÔ6NÑ%OÔ%OÑPÔPÐPÐPÐPà×%Ò% fÑ-Ô-Ð-Ð-Ð-øõ ð 	ð 	ð 	ØˆDˆDð	øøøs   ‚B Â
B%Â$B%©r9   é   é   é-   Útimeoutc                 óÊ  — |rt          |¦  «        }nd}t          ¦   «         }t          j        t	          t
          | j        ¦  «        t	          t          | j        ¦  «                             ¦   «         t          j
        |¦  «        }t	          t          | j        ¦  «                             || j        ||¦  «        }||f| j        |<   |                     | j        ||¦  «        }|S )a1  
        See L{twisted.internet.interfaces.IResolverSimple.getHostByName}.

        Note that the elements of C{timeout} are summed and the result is used
        as a timeout for the lookup.  Any intermediate timeout or retry logic
        is left up to the platform via L{socket.gethostbyname}.
        é<   )Úsumr!   r   ÚdeferToThreadPoolr   r)   r�   r,   ÚgetThreadPoolÚsocketÚgethostbynamer-   Ú	callLaterr®   r¡   ÚaddBothr´   )rT   r¢   r¹   ÚtimeoutDelayr¬   r©   r­   Ú_s           rU   ÚgetHostByNamezThreadedResolver.getHostByNameM  sÖ   € ð ð 	Ý˜w™<œ<ˆLˆLàˆLÝ&.¡j¤jˆÝ Ô2ÝÕ$ d¤lÑ3Ô3Ý• $¤,Ñ/Ô/×=Ò=Ñ?Ô?ÝÔ Øñ	
ô 
ˆõ �,¨¬Ñ5Ô5×?Ò?Ø˜$œ-¨¨~ñ
ô 
ˆ
ð 1=¸jÐ/IˆÔ˜^Ñ,Ø*×2Ò2ØÔ  nñ
ô 
ˆð ÐrW   )r�   rž   rJ   N©rµ   )ru   r”   rt   Ú__doc__rV   r•   r5   r¨   r!   r®   r   r´   r   ÚintrÅ   r{   rW   rU   rœ   rœ   !  s  € € € € € ð	ð 	ðð ð ð ð$˜#ð $ Cð $¨Gð $ð $ð $ð $ð@˜Sð @°(¸3´-ð @ÀDð @ð @ð @ð @ð
.Ø˜C ˜LÔ)ð.Ø14ð.ØFNÈsÄmð.à	ð.ð .ð .ð .ð" 3Aðð ØðØ"*¨3¤-ðà	�#Œðð ð ð ð ð rW   rœ   c                   ó>   — e Zd Z	 ddedee         dee         fd„ZdS )ÚBlockingResolverrµ   r¢   r¹   rJ   c                 óÐ   — 	 t          j        |¦  «        }t          j        |¦  «        S # t          $ r1 d|›d�}t          j        |¦  «        }t          j        |¦  «        cY S w xY w)Nr¥   z
 not found)r¿   rÀ   r   ÚsucceedÚOSErrorr   r¦   Úfail)rT   r¢   r¹   ÚaddressÚmsgr£   s         rU   rÅ   zBlockingResolver.getHostByNamen  sz   € ð	*ÝÔ*¨4Ñ0Ô0ˆGõ ”= Ñ)Ô)Ð)øõ ð 	#ð 	#ð 	#Ø/˜TÐ/Ð/Ð/ˆCÝÔ& sÑ+Ô+ˆCÝ”:˜c‘?”?Ð"Ð"Ð"ð	#øøøs   ‚* ª8A%Á$A%NrÆ   )ru   r”   rt   r•   r   rÈ   r!   rÅ   r{   rW   rU   rÊ   rÊ   l  sS   € € € € € ð 3Að
*ð 
*Øð
*Ø"*¨3¤-ð
*à	�#Œð
*ð 
*ð 
*ð 
*ð 
*ð 
*rW   rÊ   .Ú_ThreePhaseEventTriggerHandlec            
       ó~   — e Zd ZdZdd„Zdededededef
d	„Z	d
eddfd„Z
d
eddfd„Zd
eddfd„Zdd„Zdeddfd„ZdS )Ú_ThreePhaseEventaä  
    Collection of callables (with arguments) which can be invoked as a group in
    a particular order.

    This provides the underlying implementation for the reactor's system event
    triggers.  An instance of this class tracks triggers for all phases of a
    single type of event.

    @ivar before: A list of the before-phase triggers containing three-tuples
        of a callable, a tuple of positional arguments, and a dict of keyword
        arguments

    @ivar finishedBefore: A list of the before-phase triggers which have
        already been executed.  This is only populated in the C{'BEFORE'} state.

    @ivar during: A list of the during-phase triggers containing three-tuples
        of a callable, a tuple of positional arguments, and a dict of keyword
        arguments

    @ivar after: A list of the after-phase triggers containing three-tuples
        of a callable, a tuple of positional arguments, and a dict of keyword
        arguments

    @ivar state: A string indicating what is currently going on with this
        object.  One of C{'BASE'} (for when nothing in particular is happening;
        this is the initial value), C{'BEFORE'} (when the before-phase triggers
        are in the process of being executed).
    rJ   Nc                 ó>   — g | _         g | _        g | _        d| _        d S )NÚBASE)ÚbeforeÚduringÚafterÚstaterZ   s    rU   rV   z_ThreePhaseEvent.__init__£  s"   € Ø57ˆŒØ57ˆŒØ46ˆŒ
ØˆŒ
ˆ
ˆ
rW   ÚphaseÚcallablerF   Úkwargsc                 óš   — |dvrt          d¦  «        ‚t          | |¦  «                             |||f¦  «         t          ||||f¦  «        S )aÕ  
        Add a trigger to the indicate phase.

        @param phase: One of C{'before'}, C{'during'}, or C{'after'}.

        @param callable: An object to be called when this event is triggered.
        @param args: Positional arguments to pass to C{callable}.
        @param kwargs: Keyword arguments to pass to C{callable}.

        @return: An opaque handle which may be passed to L{removeTrigger} to
            reverse the effects of calling this method.
        ©rÖ   r×   rØ   úinvalid phase)r³   r‰   rŒ   rÑ   )rT   rÚ   rÛ   rF   rÜ   s        rU   Ú
addTriggerz_ThreePhaseEvent.addTrigger©  sZ   € ð& Ð5Ð5Ð5Ý˜?Ñ+Ô+Ð+Ý��eÑÔ×#Ò# X¨t°VÐ$<Ñ=Ô=Ð=Ý,¨e°X¸tÀVÐ-LÑMÔMÐMrW   Úhandlec                 óH   —  t          | d| j        z   ¦  «        |¦  «         dS )aS  
        Remove a previously added trigger callable.

        @param handle: An object previously returned by L{addTrigger}.  The
            trigger added by that call will be removed.

        @raise ValueError: If the trigger associated with C{handle} has already
            been removed or if C{handle} is not a valid handle.
        ÚremoveTrigger_N)r‰   rÙ   )rT   rá   s     rU   ÚremoveTriggerz_ThreePhaseEvent.removeTriggerÁ  s,   € ð 	5��Ð&¨¬Ñ3Ñ4Ô4°VÑ<Ô<Ð<Ð<Ð<rW   c                 óÐ   — 	 |\  }}}}|dvrt          d¦  «        ‚t          | |¦  «                             |||f¦  «         dS # t          t          f$ r t	          d¦  «        ‚w xY w)zN
        Just try to remove the trigger.

        @see: removeTrigger
        rÞ   rß   zinvalid trigger handleN)r³   r‰   ÚremoveÚ	TypeErrorÚ
ValueError©rT   rá   rÚ   rÛ   rF   rÜ   s         rU   ÚremoveTrigger_BASEz#_ThreePhaseEvent.removeTrigger_BASEÍ  sŽ   € ð	BØ,2Ñ)ˆE�8˜T 6ð Ð9Ð9Ð9Ý˜Ñ/Ô/Ð/Ý�D˜%Ñ Ô ×'Ò'¨°4¸Ð(@ÑAÔAÐAÐAÐAøõ �:Ð&ð 	7ð 	7ð 	7ÝÐ5Ñ6Ô6Ð6ð	7øøøs   ‚A Á!A%c                 óÈ   — |\  }}}}|dk    r|                       |¦  «        S |||f| j        v rt          j        dt          d¬¦  «         dS |                       |¦  «         dS )zâ
        Remove the trigger if it has yet to be executed, otherwise emit a
        warning that in the future an exception will be raised when removing an
        already-executed trigger.

        @see: removeTrigger
        rÖ   zdRemoving already-fired system event triggers will raise an exception in a future version of Twisted.r¶   )ÚcategoryÚ
stacklevelN)rê   ÚfinishedBeforeÚwarningsÚwarnÚDeprecationWarningré   s         rU   ÚremoveTrigger_BEFOREz%_ThreePhaseEvent.removeTrigger_BEFOREÜ  s�   € ð )/Ñ%ˆˆx˜˜vØ�HÒÐØ×*Ò*¨6Ñ2Ô2Ð2Ø�d˜FÐ# tÔ':Ð:Ð:ÝŒMð<å+Øð	ñ ô ð ð ð ð ×#Ò# FÑ+Ô+Ð+Ð+Ð+rW   c                 ó¬  — d| _         g | _        g }| j        r•| j                             d¦  «        \  }}}| j                             |||f¦  «         d}t
          5   ||i |¤Ž}ddd¦  «         n# 1 swxY w Y   t          |t          ¦  «        r|                     |¦  «         | j        °•t          |¦  «         	                    | j
        ¦  «         dS )z8
        Call the triggers added to this event.
        ÚBEFOREr   N)rÙ   rî   rÖ   ÚpoprŒ   Ú_systemEventHandlerrm   r!   r"   ÚaddCallbackÚ_continueFiring)rT   ÚbeforeResultsrÛ   rF   rÜ   r¯   s         rU   Ú	fireEventz_ThreePhaseEvent.fireEventñ  s'  € ð ˆŒ
Ø ˆÔØ02ˆØŒkð 	-Ø%)¤[§_¢_°QÑ%7Ô%7Ñ"ˆH�d˜FØÔ×&Ò&¨°$¸Ð'?Ñ@Ô@Ð@ØˆFÝ$ð 3ð 3Ø!˜ 4Ð2¨6Ð2Ð2�ð3ð 3ð 3ñ 3ô 3ð 3ð 3ð 3ð 3ð 3ð 3øøøð 3ð 3ð 3ð 3å˜&¥(Ñ+Ô+ð -Ø×$Ò$ VÑ,Ô,Ð,ð Œkð 	-õ 	�]Ñ#Ô#×/Ò/°Ô0DÑEÔEÐEÐEÐEs   Á	A1Á1A5Á8A5Úignoredc                 óÌ   — d| _         g | _        | j        | j        fD ]F}|rB|                     d¦  «        \  }}}t
          5   ||i |¤Ž ddd¦  «         n# 1 swxY w Y   |°BŒGdS )zJ
        Call the during and after phase triggers for this event.
        rÕ   r   N)rÙ   rî   r×   rØ   rõ   rö   )rT   rû   rÚ   rÛ   rF   rÜ   s         rU   rø   z _ThreePhaseEvent._continueFiring  sÎ   € ð ˆŒ
Ø ˆÔØ”[ $¤*Ð,ð 	.ð 	.ˆEØð .Ø).¯ª°1©¬Ñ&�˜$ Ý(ð .ð .Ø�H˜dÐ- fÐ-Ð-Ð-ð.ð .ð .ñ .ô .ð .ð .ð .ð .ð .ð .øøøð .ð .ð .ð .ð ð .øð	.ð 	.s   Á	AÁA	ÁA	r“   )ru   r”   rt   rÇ   rV   r•   Ú_ThreePhaseEventTriggerCallabler™   rÑ   rà   rä   rê   rò   rú   rø   r{   rW   rU   rÓ   rÓ   …  s(  € € € € € ðð ð:ð ð ð ðNàðNð 2ðNð ð	Nð
 ðNð 
'ðNð Nð Nð Nð0
=Ð$Að 
=Àdð 
=ð 
=ð 
=ð 
=ðBÐ)Fð BÈ4ð Bð Bð Bð Bð,Ð+Hð ,ÈTð ,ð ,ð ,ð ,ð*Fð Fð Fð Fð"
. vð 
.°$ð 
.ð 
.ð 
.ð 
.ð 
.ð 
.rW   rÓ   c                   óŽ   — e Zd ZU dZ e¦   «         Zeed<    ee¦  «        Z	e
ed<   dedefd„Zde
de
fd„Zede
fd„¦   «         ZdS )	ÚPluggableResolverMixinzÁ
    A mixin which implements the pluggable resolver reactor interfaces.

    @ivar resolver: The installed L{IResolverSimple}.
    @ivar _nameResolver: The installed L{IHostnameResolver}.
    ÚresolverÚ_nameResolverrJ   c                 óv   — t          j        |¦  «        sJ ‚| j        }|| _        t          |¦  «        | _        |S )z£
        See L{IReactorPluggableResolver}.

        @param resolver: see L{IReactorPluggableResolver}.

        @return: see L{IReactorPluggableResolver}.
        )r/   Ú
providedByr   Ú_SimpleResolverComplexifierr  )rT   r   ÚoldResolvers      rU   ÚinstallResolverz&PluggableResolverMixin.installResolver  s?   € õ Ô)¨(Ñ3Ô3Ð3Ð3Ð3Ø”mˆØ ˆŒÝ8¸ÑBÔBˆÔØÐrW   c                 óJ   — | j         }|| _         t          |¦  «        | _        |S )z¯
        See L{IReactorPluggableNameResolver}.

        @param resolver: See L{IReactorPluggableNameResolver}.

        @return: see L{IReactorPluggableNameResolver}.
        )r  Ú_ComplexResolverSimplifierr   )rT   r   ÚpreviousNameResolvers      rU   ÚinstallNameResolverz*PluggableResolverMixin.installNameResolver+  s*   € ð  $Ô1ÐØ%ˆÔÝ2°8Ñ<Ô<ˆŒØ#Ð#rW   c                 ó   — | j         S )zd
        Implementation of read-only
        L{IReactorPluggableNameResolver.nameResolver}.
        )r  rZ   s    rU   ÚnameResolverz#PluggableResolverMixin.nameResolver8  s   € ð Ô!Ð!rW   N)ru   r”   rt   rÇ   rÊ   r   r/   r–   r  r  r&   r  r
  Úpropertyr  r{   rW   rU   rÿ   rÿ     sÅ   € € € € € € ðð ð !1Ð 0Ñ 2Ô 2€HˆoÐ2Ð2Ñ2Ø'BÐ'BÀ8Ñ'LÔ'L€MÐ$ÐLÐLÑLð¨ð ¸Oð ð ð ð ð$Ð,=ð $ÐBSð $ð $ð $ð $ð ð"Ð/ð "ð "ð "ñ „Xð"ð "ð "rW   rÿ   Ú_SystemEventIDc                   óv  ‡ — e Zd ZU dZdZdZdZdZdZ e	¦   «         Z
eed<   dZ dNˆ fd„ZdZeed	<   d
edefd„Zdefd„Zdeddfd„Zdeddfd„ZdOd
eddfd„ZdNd„ZdZdNd„ZdNd„Zdee         ddfd„Zdeddfd„Zdeddfd„Zdeddfd„Z deddfd„Z!de"e#eef                  fd„Z$de"e         fd„Z%de"e         fd„Z&	 dPde'd e(e)         de*e'         fd!„Z+dNd"„Z,dNd#„Z-dQd$e)d%ee.         ddfd&„Z/dQd$e)d%ee.         ddfd'„Z0dQd$e)d%ee.         ddfd(„Z1dNd)„Z2dRdeddfd+„Z3d,e'ddfd-„Z4d.e'd,e'd/e5d0e6f         d1e7d2e7de8fd3„Z9d4e8ddfd5„Z:d/e5d0e6f         d1e7d2e7dee8         fd6„Z;dOd
eddfd7„Z<dNd8„Z= e>e?¦  «        Z@ded/e5d0e6f         d1e7d9e7deAf
d:„ZBd;eAddfd<„ZCd;eAddfd=„ZDde(eE         fd>„ZFdNd?„ZGdee         fd@„ZHdNdA„ZI eJjK        ¦   «         rTeL€J ‚dZMdZNdZOdNdB„ZPdCe5d0e6f         d1e7d2e7ddfdD„ZQdNdE„ZRdNdF„ZSdNdG„ZTdeLfdH„ZUdIe5d0e6f         d1e7d2e7ddfdJ„ZVdKe)ddfdL„ZWˆ xZXS dCe5d0e6f         d1e7d2e7ddfdM„ZQˆ xZXS )Srž   aï  
    Default base class for Reactors.

    @ivar _stopped: A flag which is true between paired calls to C{reactor.run}
        and C{reactor.stop}.  This should be replaced with an explicit state
        machine.
    @ivar _justStopped: A flag which is true between the time C{reactor.stop}
        is called and the time the shutdown system event is fired.  This is
        used to determine whether that event should be fired after each
        iteration through the mainloop.  This should be replaced with an
        explicit state machine.
    @ivar _started: A flag which is true from the time C{reactor.run} is called
        until the time C{reactor.run} returns.  This is used to prevent calls
        to C{reactor.run} on a running reactor.  This should be replaced with
        an explicit state machine.
    @ivar running: See L{IReactorCore.running}
    @ivar _registerAsIOThread: A flag controlling whether the reactor will
        register the thread it is running in as the I/O thread when it starts.
        If C{True}, registration will be done, otherwise it will not be.
    @ivar _exitSignal: See L{_ISupportsExitSignalCapturing._exitSignal}

    @ivar _installSignalHandlers: A flag which indicates whether any signal
        handlers will be installed during startup.  This includes handlers for
        SIGCHLD to monitor child processes, and SIGINT, SIGTERM, and SIGBREAK

    @ivar _signals: An object which knows how to install and uninstall the
        reactor's signal-handling behavior.
    TFNÚ_signalsútwisted.internet.reactorrJ   c                 ó  •— t          ¦   «                              ¦   «          g | _        i | _        g | _        g | _        d| _        d| _        d| _        d| _	        d| _
        t          ¦   «         | _        d | _        |                      dd| j        ¦  «         |                      dd| j        ¦  «         |                      dd| j        ¦  «         t%          j        ¦   «         r|                      ¦   «          |                      ¦   «          d S )Nr   Fr×   ÚstartupÚshutdown)ÚsuperrV   ÚthreadCallQueueÚ_eventTriggersÚ_pendingTimedCallsÚ_newTimedCallsÚ_cancellationsÚrunningÚ_startedÚ_justStoppedÚ_startedBeforeÚsetÚ_internalReadersÚwakerÚaddSystemEventTriggerÚ_reallyStartRunningÚcrashÚdisconnectAllr7   ÚsupportsThreadsÚ_initThreadsÚinstallWaker)rT   Ú	__class__s    €rU   rV   zReactorBase.__init__s  s  ø€ Ý‰Œ×ÒÑÔÐØ24ˆÔØ;=ˆÔØ57ˆÔØ13ˆÔØˆÔØˆŒØˆŒØ!ˆÔØ#ˆÔõ +.©%¬%ˆÔØˆŒ
ð
 	×"Ò" 8¨Y¸Ô8PÑQÔQÐQØ×"Ò" 8¨Z¸¼ÑDÔDÐDØ×"Ò" 8¨Z¸Ô9KÑLÔLÐLåÔ#Ñ%Ô%ð 	 Ø×ÒÑÔÐØ×ÒÑÔÐÐÐrW   Ú_installSignalHandlersÚinstallSignalHandlersc                 óJ   — |r|                       ¦   «         S t          ¦   «         S )zð
        Get an appropriate signal handling object.

        @param installSignalHandlers: Indicate whether to even try to do any
            signal handling.  If C{False} then the result will be a no-op
            implementation.
        )Ú_signalsFactoryr;   ©rT   r+  s     rU   Ú_makeSignalHandlingzReactorBase._makeSignalHandling‘  s*   € ð !ð 	*Ø×'Ò'Ñ)Ô)Ð)Ý%Ñ'Ô'Ð'rW   c                 óB   — t          | j        | j        | j        ¦  «        S )z“
        Get a signal handling object that implements the basic behavior of
        stopping the reactor on SIGINT, SIGBREAK, and SIGTERM.
        )r<   ÚsigIntÚsigBreakÚsigTermrZ   s    rU   r-  zReactorBase._signalsFactory�  s%   € õ
 #ØŒKØŒMØŒLñ
ô 
ð 	
rW   Úreaderc                 ód   — | j                              |¦  «         |                      |¦  «         dS )zº
        Add a read descriptor which is part of the implementation of the
        reactor itself.

        The read descriptor will not be removed by L{IReactorFDSet.removeAll}.
        N)r   ÚaddÚ	addReader©rT   r4  s     rU   Ú_addInternalReaderzReactorBase._addInternalReader¨  s3   € ð 	Ô×!Ò! &Ñ)Ô)Ð)Ø�Š�vÑÔÐÐÐrW   c                 ód   — | j                              |¦  «         |                      |¦  «         dS )zm
        Remove a read descriptor which is part of the implementation of the
        reactor itself.
        N)r   ræ   ÚremoveReaderr8  s     rU   Ú_removeInternalReaderz!ReactorBase._removeInternalReader²  s5   € ð
 	Ô×$Ò$ VÑ,Ô,Ð,Ø×Ò˜&Ñ!Ô!Ð!Ð!Ð!rW   c                 óÊ   — |                       |¬¦  «         	 |                      ¦   «          | j                             ¦   «          d S # | j                             ¦   «          w xY w)N)r+  )ÚstartRunningÚmainLoopr  Ú	uninstallr.  s     rU   ÚrunzReactorBase.runº  s`   € Ø×ÒÐ0EÐÑFÔFÐFð	&Ø�MŠM‰OŒOˆOàŒM×#Ò#Ñ%Ô%Ð%Ð%Ð%øˆDŒM×#Ò#Ñ%Ô%Ð%Ð%øøøs   ˜A ÁA"c                 ó   — | j         rlt          5  |                      ¦   «          |                      ¦   «         }| j        o|}|                      |¦  «         d d d ¦  «         n# 1 swxY w Y   | j         °lt                               d¦  «         d S )NzMain loop terminated.)r  Ú_topHandlerÚrunUntilCurrentr¹   r  ÚdoIterationÚ_logÚinfo)rT   Út2Úts      rU   r?  zReactorBase.mainLoopÁ  sÍ   € ØŒmð 	$Ýð $ð $à×$Ò$Ñ&Ô&Ð&Ø—\’\‘^”^�Ø”LÐ' R�Ø× Ò  Ñ#Ô#Ð#ð$ð $ð $ñ $ô $ð $ð $ð $ð $ð $ð $øøøð $ð $ð $ð $ð Œmð 	$õ 	�	Š	Ð)Ñ*Ô*Ð*Ð*Ð*s   �AA"Á"A&Á)A&c                 óT   — t          t          j        | j        ¦  «        dz   ¦  «        ‚)Nz did not implement installWaker©ÚNotImplementedErrorr4   Úqualr)  rZ   s    rU   r(  zReactorBase.installWakerÏ  ó)   € Ý!ÝŒL˜œÑ(Ô(Ð+LÑLñ
ô 
ð 	
rW   c                 óJ   — | j         r| j                              ¦   «          dS dS )z)
        Wake up the event loop.
        N)r!  ÚwakeUprZ   s    rU   rP  zReactorBase.wakeUpÔ  s2   € ð Œ:ð 	 ØŒJ×ÒÑÔÐÐÐð	 ð 	 rW   rf   c                 óT   — t          t          j        | j        ¦  «        dz   ¦  «        ‚)zV
        Do one iteration over the readers and writers which have been added.
        z did not implement doIterationrK  ©rT   rf   s     rU   rE  zReactorBase.doIterationÝ  s+   € õ "ÝŒL˜œÑ(Ô(Ð+KÑKñ
ô 
ð 	
rW   c                 óT   — t          t          j        | j        ¦  «        dz   ¦  «        ‚)Nz did not implement addReaderrK  r8  s     rU   r7  zReactorBase.addReaderå  ó)   € Ý!ÝŒL˜œÑ(Ô(Ð+IÑIñ
ô 
ð 	
rW   Úwriterc                 óT   — t          t          j        | j        ¦  «        dz   ¦  «        ‚)Nz did not implement addWriterrK  ©rT   rU  s     rU   Ú	addWriterzReactorBase.addWriterê  rT  rW   c                 óT   — t          t          j        | j        ¦  «        dz   ¦  «        ‚)Nz did not implement removeReaderrK  r8  s     rU   r;  zReactorBase.removeReaderï  rN  rW   c                 óT   — t          t          j        | j        ¦  «        dz   ¦  «        ‚)Nz did not implement removeWriterrK  rW  s     rU   ÚremoveWriterzReactorBase.removeWriterô  rN  rW   c                 óT   — t          t          j        | j        ¦  «        dz   ¦  «        ‚)Nz did not implement removeAllrK  rZ   s    rU   Ú	removeAllzReactorBase.removeAllù  rT  rW   c                 óT   — t          t          j        | j        ¦  «        dz   ¦  «        ‚)Nz did not implement getReadersrK  rZ   s    rU   Ú
getReaderszReactorBase.getReadersþ  ó)   € Ý!ÝŒL˜œÑ(Ô(Ð+JÑJñ
ô 
ð 	
rW   c                 óT   — t          t          j        | j        ¦  «        dz   ¦  «        ‚)Nz did not implement getWritersrK  rZ   s    rU   Ú
getWriterszReactorBase.getWriters  r`  rW   rµ   r¢   r¹   c                 ó´   — |st          j        d¦  «        S t          j        |¦  «        rt          j        |¦  «        S | j                             ||¦  «        S )z8
        Return a Deferred that will resolve a hostname.z0.0.0.0)r   rÌ   r   ÚisIPAddressr   rÅ   )rT   r¢   r¹   s      rU   ÚresolvezReactorBase.resolve	  sW   € ð
 ð 	,å”= Ñ+Ô+Ð+ÝÔ Ñ%Ô%ð 	'Ý”= Ñ&Ô&Ð&ØŒ}×*Ò*¨4°Ñ9Ô9Ð9rW   c                 óf   — | j         rt          j        d¦  «        ‚d| _         d| _        d| _        dS )zD
        See twisted.internet.interfaces.IReactorCore.stop.
        z&Can't stop reactor that isn't running.TN)Ú_stoppedr   ÚReactorNotRunningr  r  rZ   s    rU   ÚstopzReactorBase.stop  s>   € ð Œ=ð 	TÝÔ)Ð*RÑSÔSÐSØˆŒØ ˆÔØ"ˆÔÐÐrW   c                 óZ   — d| _         d| _        |                      dd| j        ¦  «         dS )zý
        See twisted.internet.interfaces.IReactorCore.crash.

        Reset reactor state tracking attributes and re-initialize certain
        state-transition helpers which were set up in C{__init__} but later
        destroyed (through use).
        Fr×   r  N)r  r  r"  r#  rZ   s    rU   r$  zReactorBase.crash  s3   € ð ˆŒØˆŒØ×"Ò" 8¨Y¸Ô8PÑQÔQÐQÐQÐQrW   ÚnumberÚframec                 ó|   — t                                d¦  «         |                      | j        ¦  «         || _        dS )z¶
        Handle a SIGINT interrupt.

        @param number: See handler specification in L{signal.signal}
        @param frame: See handler specification in L{signal.signal}
        zReceived SIGINT, shutting down.N©rF  rG  ÚcallFromThreadri  Ú_exitSignal©rT   rk  rl  s      rU   r1  zReactorBase.sigInt+  s;   € õ 	�	Š	Ð3Ñ4Ô4Ð4Ø×Ò˜DœIÑ&Ô&Ð&Ø!ˆÔÐÐrW   c                 ó|   — t                                d¦  «         |                      | j        ¦  «         || _        dS )z¸
        Handle a SIGBREAK interrupt.

        @param number: See handler specification in L{signal.signal}
        @param frame: See handler specification in L{signal.signal}
        z!Received SIGBREAK, shutting down.Nrn  rq  s      rU   r2  zReactorBase.sigBreak6  s;   € õ 	�	Š	Ð5Ñ6Ô6Ð6Ø×Ò˜DœIÑ&Ô&Ð&Ø!ˆÔÐÐrW   c                 ó|   — t                                d¦  «         |                      | j        ¦  «         || _        dS )z·
        Handle a SIGTERM interrupt.

        @param number: See handler specification in L{signal.signal}
        @param frame: See handler specification in L{signal.signal}
        z Received SIGTERM, shutting down.Nrn  rq  s      rU   r3  zReactorBase.sigTermA  s;   € õ 	�	Š	Ð4Ñ5Ô5Ð5Ø×Ò˜DœIÑ&Ô&Ð&Ø!ˆÔÐÐrW   c                 ó’   — |                       ¦   «         }|D ]/}t          ||j        t          t          j        ¦  «        ¦  «         Œ0dS )z2Disconnect every reader, and writer in the system.N)r]  Ú_callWithLoggerÚconnectionLostr5   r   ÚCONNECTION_LOST)rT   Úselectablesr4  s      rU   r%  zReactorBase.disconnectAllL  sV   € à—n’nÑ&Ô&ˆØ!ð 	ð 	ˆFÝØ˜Ô-­wµtÔ7KÑ/LÔ/Lñô ð ð ð	ð 	rW   rL   c                 óX   — |                       ¦   «          |                      |¦  «         dS )zG
        See twisted.internet.interfaces.IReactorCore.iterate.
        N)rD  rE  rR  s     rU   ÚiteratezReactorBase.iterateT  s0   € ð 	×ÒÑÔÐØ×Ò˜ÑÔÐÐÐrW   Ú	eventTypec                 ój   — | j                              |¦  «        }|�|                     ¦   «          dS dS )zO
        See twisted.internet.interfaces.IReactorCore.fireSystemEvent.
        N)r  Úgetrú   )rT   r{  Úevents      rU   ÚfireSystemEventzReactorBase.fireSystemEvent[  s>   € ð Ô#×'Ò'¨	Ñ2Ô2ˆØÐØ�OŠOÑÔÐÐÐð ÐrW   rÚ   rÛ   .rF   rÜ   c                 óÚ   — t          j        |¦  «        sJ |› d�¦   «         ‚|| j        vrt          ¦   «         | j        |<   t	          | | j        |         j        ||g|¢R i |¤Žf¦  «        S )zU
        See twisted.internet.interfaces.IReactorCore.addSystemEventTrigger.
        ú is not callable)ÚbuiltinsrÛ   r  rÓ   r  rà   )rT   rÚ   r{  rÛ   rF   rÜ   s         rU   r"  z!ReactorBase.addSystemEventTriggerc  s    € õ Ô  Ñ*Ô*ÐIÐI¨xÐ,IÐ,IÐ,IÑIÔIÐIØ˜DÔ/Ð/Ð/Ý-=Ñ-?Ô-?ˆDÔ 	Ñ*ÝàØ9�Ô# IÔ.Ô9Ø˜8ðØ&*ðð ð Ø.4ðð ðñ
ô 
ð 	
rW   Ú	triggerIDc                 óP   — |\  }}| j         |                              |¦  «         dS )zX
        See twisted.internet.interfaces.IReactorCore.removeSystemEventTrigger.
        N)r  rä   )rT   rƒ  r{  rá   s       rU   ÚremoveSystemEventTriggerz$ReactorBase.removeSystemEventTriggerz  s0   € ð &Ñˆ	�6ØÔ˜IÔ&×4Ò4°VÑ<Ô<Ð<Ð<Ð<rW   c                 óJ   — | j         r
 ||i |¤Ž dS  | j        dd|g|¢R i |¤ŽS )zO
        See twisted.internet.interfaces.IReactorCore.callWhenRunning.
        NrØ   r  )r  r"  )rT   rÛ   rF   rÜ   s       rU   ÚcallWhenRunningzReactorBase.callWhenRunning�  s`   € ð Œ<ð 	ØˆH�dÐ%˜fÐ%Ð%Ð%Ø�4à-�4Ô-Ø˜ HðØ/3ðð ð Ø7=ðð ð rW   c                 ó\  — | j         rt          j        ¦   «         ‚| j        rt          j        ¦   «         ‚| j                             ¦   «          || _        |                      |¦  «        | _        d| _         d| _	        | j
        rt          j        ¦   «          |                      d¦  «         dS )ax  
        Method called when reactor starts: do some initialization and fire
        startup events.

        Don't call this directly, call reactor.run() instead: it should take
        care of calling this.

        This method is somewhat misnamed.  The reactor will not necessarily be
        in the running state by the time this method returns.  The only
        guarantee is that it will be on its way to the running state.

        @param installSignalHandlers: A flag which, if set, indicates that
            handlers for a number of (implementation-defined) signals should be
            installed during startup.
        TFr  N)r  r   ÚReactorAlreadyRunningr  ÚReactorNotRestartabler  r@  r*  r/  rg  Ú_registerAsIOThreadr>   ÚregisterAsIOThreadr  r.  s     rU   r>  zReactorBase.startRunning�  s«   € ð  Œ=ð 	0ÝÔ-Ñ/Ô/Ð/ØÔð 	0ÝÔ-Ñ/Ô/Ð/àŒ×ÒÑ!Ô!Ð!Ø&;ˆÔ#Ø×0Ò0Ð1FÑGÔGˆŒàˆŒØˆŒØÔ#ð 	,ÝÔ)Ñ+Ô+Ð+Ø×Ò˜YÑ'Ô'Ð'Ð'Ð'rW   c                 óX   — d| _         | j        r| j                             ¦   «          dS dS )z�
        Method called to transition to the running state.  This should happen
        in the I{during startup} event trigger phase.
        TN)r  r*  r  ÚinstallrZ   s    rU   r#  zReactorBase._reallyStartRunning®  s<   € ð
 ˆŒØÔ&ð 	$ð ŒM×!Ò!Ñ#Ô#Ð#Ð#Ð#ð	$ð 	$rW   rG   c           	      ó  — t          j        |¦  «        sJ |› d�¦   «         ‚|dk    sJ |› d�¦   «         ‚t          |                      ¦   «         |z   |||| j        | j        | j        ¬¦  «        }| j                             |¦  «         |S )zI
        See twisted.internet.interfaces.IReactorTime.callLater.
        r�  r   z* is not greater than or equal to 0 seconds)r8   )r‚  rÛ   rA   r8   Ú_cancelCallLaterÚ_moveCallLaterSoonerr  rŒ   )rT   rf   rÛ   rF   rG   ÚdelayedCalls         rU   rÁ   zReactorBase.callLaterÁ  s¥   € õ Ô  Ñ*Ô*ÐIÐI¨xÐ,IÐ,IÐ,IÑIÔIÐIØ˜Šzˆzˆz˜eÐOÐOÐO‰zŒzˆzÝ!Ø�LŠL‰NŒN˜UÑ"ØØØØÔ!ØÔ%Ø”Lð
ñ 
ô 
ˆð 	Ô×"Ò" ;Ñ/Ô/Ð/ØÐrW   r’  c                 óØ   — | j         }	 |                     |¦  «        }||         }|dk    r(|dz
  dz  }||         |k    rn||         ||<   |}|dk    °(|||<   d S # t          $ r Y d S w xY w)Nr   r9   é   )r  Úindexrè   )rT   r’  ÚheapÚposÚeltÚparents         rU   r‘  z ReactorBase._moveCallLaterSoonerÕ  s¡   € àÔ&ˆð	Ø—*’*˜[Ñ)Ô)ˆCð �s”)ˆCØ˜’(�(Ø ™' a™�Ø˜”< 3Ò&Ð&Øà  œL��S‘	Ø�ð ˜’(�(ð ˆD�‰IˆIˆIøÝð 	ð 	ð 	àˆDˆDð	øøøs   ‰AA Á
A)Á(A)c                 ó&   — | xj         dz  c_         d S ©Nr9   )r  )rT   r’  s     rU   r�  zReactorBase._cancelCallLateré  s   € ØÐÔ˜qÑ ÐÔÐÐrW   c                 ó4   — d„ | j         | j        z   D ¦   «         S )zQ
        See L{twisted.internet.interfaces.IReactorTime.getDelayedCalls}
        c                 ó    — g | ]}|j         °	|‘ŒS r{   ©rP   ©r~   Úxs     rU   r€   z/ReactorBase.getDelayedCalls.<locals>.<listcomp>ð  s0   € ð 
ð 
ð 
àØ”;ð
Øð
ð 
ð 
rW   )r  r  rZ   s    rU   ÚgetDelayedCallszReactorBase.getDelayedCallsì  s.   € ð
ð 
àÔ-°Ô0CÑCð
ñ 
ô 
ð 	
rW   c                 óª   — | j         D ]C}|j        r| xj        dz  c_        Œ|                     ¦   «          t	          | j        |¦  «         ŒDg | _         d S r›  )r  rP   r  re   r   r  )rT   Úcalls     rU   Ú_insertNewDelayedCallsz"ReactorBase._insertNewDelayedCallsö  sk   € ØÔ'ð 	8ð 	8ˆDØŒ~ð 8ØÐ#Ô# qÑ(Ð#Ô#Ð#à×#Ò#Ñ%Ô%Ð%Ý˜Ô0°$Ñ7Ô7Ð7Ð7Ø ˆÔÐÐrW   c                 óÊ   — |                       ¦   «          | j        sdS | j        d         j        |                      ¦   «         z
  }d}t	          dt          ||¦  «        ¦  «        S )zø
        Determine the longest time the reactor may sleep (waiting on I/O
        notification, perhaps) before it must wake up to service a time-related
        event.

        @return: The maximum number of seconds the reactor may sleep.
        Nr   i›Ä  )r¤  r  rD   r8   ÚmaxÚmin)rT   rf   Úlongests      rU   r¹   zReactorBase.timeoutÿ  sf   € ð 	×#Ò#Ñ%Ô%Ð%àÔ&ð 	Ø�4àÔ'¨Ô*Ô/°$·,²,±.´.Ñ@ˆð ˆõ �1•c˜' 5Ñ)Ô)Ñ*Ô*Ð*rW   c                 óJ  — | j         r}d}t          | j         ¦  «        }| j         D ]:\  }}}t          5   ||i |¤Ž ddd¦  «         n# 1 swxY w Y   |dz  }||k    r nŒ;| j         d|…= | j         r|                      ¦   «          |                      ¦   «          |                      ¦   «         }| j        rî| j        d         j        |k    rØt          | j        ¦  «        }|j	        r| xj
        dz  c_
        ŒI|j        dk    r*|                     ¦   «          t          | j        |¦  «         Œ~t                               d|j        fd„¬¦  «        5  d|_         |j        |j        i |j        ¤Ž ddd¦  «         n# 1 swxY w Y   | j        r| j        d         j        |k    °Ø| j
        dk    rQ| j
        t          | j        ¦  «        dz	  k    r1d| _
        d	„ | j        D ¦   «         | _        t+          | j        ¦  «         | j        rd
| _        |                      d¦  «         dS dS )z.
        Run all pending timed calls.
        r   Nr9   rL   z&while handling timed call {previous()}c                 óŒ   — | €dn@dd                      | ¦  «                             ¦   «                              dd¦  «        z   dz   S )Nr‡   z)
 C: from a DelayedCall created here:
 C:ú
z
 C:)r�   ÚrstripÚreplace)rC   s    rU   ú<lambda>z-ReactorBase.runUntilCurrent.<locals>.<lambda>@  sU   € à�ð �Bðð —g’g˜gÑ&Ô&×-Ò-Ñ/Ô/×7Ò7¸¸gÑFÔFñGð ñ	ð rW   )Úpreviousé2   c                 ó    — g | ]}|j         °	|‘ŒS r{   rž  rŸ  s     rU   r€   z/ReactorBase.runUntilCurrent.<locals>.<listcomp>R  s/   € ð 'ð 'ð 'Ø¸!¼+ð'Øð'ð 'ð 'rW   Fr  )r  ÚlenÚ_threadCallHandlerrP  r¤  r8   r  rD   r   rP   r  rR   re   r   rF  ÚfailuresHandledrC   rQ   rE   rF   rG   r   r  r  )rT   ÚcountÚtotalÚfÚarG   r�   r£  s           rU   rD  zReactorBase.runUntilCurrent  s  € ð Ôð 	ð ˆEÝ˜Ô,Ñ-Ô-ˆEØ Ô0ð ð ‘��1�bÝ'ð  ð  Ø�A�q�K˜B�K�K�Kð ð  ð  ñ  ô  ð  ð  ð  ð  ð  ð  øøøð  ð  ð  ð  à˜‘
�Ø˜E’>�>Ø�Eð "àÔ$ V e VÐ,ØÔ#ð Ø—’‘”�ð 	×#Ò#Ñ%Ô%Ð%à�lŠl‰nŒnˆØÔ%ð 	1¨4Ô+BÀ1Ô+EÔ+JÈcÒ+QÐ+QÝ˜4Ô2Ñ3Ô3ˆDØŒ~ð ØÐ#Ô# qÑ(Ð#Ô#ØàÔ  3Ò&Ð&Ø×#Ò#Ñ%Ô%Ð%Ý˜Ô0°$Ñ7Ô7Ð7Øå×%Ò%Ø8Ø(,¬ð ð ð ð &ñ ô ð 1ð 1ð  �”Ø�”	˜4œ9Ð0¨¬Ð0Ð0Ð0ð1ð 1ð 1ñ 1ô 1ð 1ð 1ð 1ð 1ð 1ð 1øøøð 1ð 1ð 1ð 1ð Ô%ð 	1¨4Ô+BÀ1Ô+EÔ+JÈcÒ+QÐ+Qð6 Ô "Ò$Ð$ØÔ#¥c¨$Ô*AÑ&BÔ&BÀaÑ&GÒGÐGà"#ˆDÔð'ð 'ØÔ2ð'ñ 'ô 'ˆDÔ#õ �DÔ+Ñ,Ô,Ð,àÔð 	-Ø %ˆDÔØ× Ò  Ñ,Ô,Ð,Ð,Ð,ð	-ð 	-s#   ²	AÁA	ÁA	ÅE:Å:E>ÆE>c                 óŠ   — |                       t          t          t          | ¦  «        | j        ¦  «        ¦  «         d| _        d S )NT)r
  Ú_GAIResolverr   r,   r¾   ÚusingThreadsrZ   s    rU   r'  zReactorBase._initThreadse  sD   € Ø×$Ò$Ý�T¥/°4Ñ8Ô8¸$Ô:LÑMÔMñô ð ð !%ˆDÔÐÐrW   r·  c                 ó    — t          |¦  «        sJ |› d�¦   «         ‚| j                             |||f¦  «         |                      ¦   «          dS )zl
            See
            L{twisted.internet.interfaces.IReactorFromThreads.callFromThread}.
            r�  N)rÛ   r  rŒ   rP  ©rT   r·  rF   rÜ   s       rU   ro  zReactorBase.callFromThreadn  sX   € õ ˜A‘;”;Ð6Ð6 1Ð 6Ð 6Ð 6Ñ6Ô6Ð6ð Ô ×'Ò'¨¨D°&Ð(9Ñ:Ô:Ð:Ø�KŠK‰MŒMˆMˆMˆMrW   c                 ó¼   — t          ddd¦  «        | _        |                      | j        j        ¦  «        | _        |                      dd| j        ¦  «        | _        dS )zO
            Create the threadpool accessible with callFromThread.
            r   é
   r  r×   r  N)r?   Ú
threadpoolr‡  ÚstartÚ_threadpoolStartupIDr"  Ú_stopThreadPoolÚthreadpoolShutdownIDrZ   s    rU   Ú_initThreadPoolzReactorBase._initThreadPool|  s[   € õ )¨¨BÐ0JÑKÔKˆDŒOØ(,×(<Ò(<¸T¼_Ô=RÑ(SÔ(SˆDÔ%Ø(,×(BÒ(BØ˜* dÔ&:ñ)ô )ˆDÔ%Ð%Ð%rW   c                 ó8   — | j                              ¦   «          d S r    )r  r@  rZ   s    rU   Ú_uninstallHandlerzReactorBase._uninstallHandler†  s   € ØŒM×#Ò#Ñ%Ô%Ð%Ð%Ð%rW   c                 ó  — | j         | j        g}t          d|¦  «        D ](}	 |                      |¦  «         Œ# t          $ r Y Œ%w xY wd| _         d| _        | j        €J ‚| j                             ¦   «          d| _        dS )a4  
            Stop the reactor threadpool.  This method is only valid if there
            is currently a threadpool (created by L{_initThreadPool}).  It
            is not intended to be called directly; instead, it will be
            called by a shutdown trigger created in L{_initThreadPool}.
            N)rÂ  rÄ  Úfilterr…  rè   rÀ  ri  )rT   ÚtriggersÚtriggers      rU   rÃ  zReactorBase._stopThreadPool‰  s¦   € ð Ô1°4Ô3LÐMˆHÝ! $¨Ñ1Ô1ð ð �ðØ×1Ò1°'Ñ:Ô:Ð:Ð:øÝ!ð ð ð Ø�Dðøøøà(,ˆDÔ%Ø(,ˆDÔ%Ø”?Ð.Ð.Ð.ØŒO× Ò Ñ"Ô"Ð"Ø"ˆDŒOˆOˆOs   ¢8¸
AÁAc                 óX   — | j         €|                      ¦   «          | j         €J ‚| j         S )z[
            See L{twisted.internet.interfaces.IReactorThreads.getThreadPool}.
            )rÀ  rÅ  rZ   s    rU   r¾   zReactorBase.getThreadPoolœ  s4   € ð ŒÐ&Ø×$Ò$Ñ&Ô&Ð&Ø”Ð2Ð2Ð2Ø”?Ð"rW   Ú	_callablec                 óL   —  |                       ¦   «         j        |g|¢R i |¤Ž dS )z\
            See L{twisted.internet.interfaces.IReactorInThreads.callInThread}.
            N)r¾   ÚcallInThread)rT   rÍ  rF   rÜ   s       rU   rÏ  zReactorBase.callInThread¨  s9   € ð .ˆD×ÒÑ Ô Ô-¨iÐI¸$ÐIÐIÐIÀ&ÐIÐIÐIÐIÐIrW   Úsizec                 óV   — |                       ¦   «                              |¬¦  «         dS )zc
            See L{twisted.internet.interfaces.IReactorThreads.suggestThreadPoolSize}.
            )Ú
maxthreadsN)r¾   ÚadjustPoolsize)rT   rÐ  s     rU   ÚsuggestThreadPoolSizez!ReactorBase.suggestThreadPoolSize°  s-   € ð ×ÒÑ Ô ×/Ò/¸4Ð/Ñ@Ô@Ð@Ð@Ð@rW   c                 óx   — t          |¦  «        sJ |› d�¦   «         ‚| j                             |||f¦  «         d S )Nr�  )rÛ   r  rŒ   r½  s       rU   ro  zReactorBase.callFromThread¸  sK   € õ ˜A‘;”;Ð6Ð6 1Ð 6Ð 6Ð 6Ñ6Ô6Ð6àÔ ×'Ò'¨¨D°&Ð(9Ñ:Ô:Ð:Ð:Ð:rW   r“   )TrÆ   r    )rL   )Yru   r”   rt   rÇ   r‹  rg  Ú	installedr»  rp  r;   r  r:   r–   rV   r*  rš   r/  r-  r.   r9  r<  rA  r?  Ú_lockr(  rP  r   r˜   rE  r7  r0   rX  r;  r[  r   r   r]  r_  rb  r•   r   rÈ   r!   re  ri  r$  r	   r1  r2  r3  r%  rz  r  r   r   r™   r  r"  r…  r‡  r>  r#  Ústaticmethodr—   r8   rA   rÁ   r‘  r�  r%   r¡  r¤  r¹   rD  r7   r&  r?   rÀ  rÂ  rÄ  r'  ro  rÅ  rÇ  rÃ  r¾   rÏ  rÔ  Ú__classcell__)r)  s   @rU   rž   rž   E  s•  ø€ € € € € € ðð ð: Ðà€HØ€IØ€LØ€Kð  6Ð5Ñ7Ô7€HˆnÐ7Ð7Ñ7à)€Hðð ð ð ð ð ð8 $)Ð˜DÐ(Ð(Ñ(ð
(¸ð 
(À.ð 
(ð 
(ð 
(ð 
(ð	
 ð 	
ð 	
ð 	
ð 	
ð¨ð ¸Tð ð ð ð ð"¨Oð "Àð "ð "ð "ð "ð&ð &¨ð &¸ð &ð &ð &ð &ð+ð +ð +ð +ð €Eð
ð 
ð 
ð 
ð
 ð  ð  ð  ð
 ¨%¤ð 
°Tð 
ð 
ð 
ð 
ð
 ð 
°Dð 
ð 
ð 
ð 
ð

Ð 0ð 
°Tð 
ð 
ð 
ð 
ð

 ?ð 
°tð 
ð 
ð 
ð 
ð

Ð#3ð 
¸ð 
ð 
ð 
ð 
ð

˜4  oÐ7GÐ&GÔ HÔIð 
ð 
ð 
ð 
ð

˜D Ô1ð 
ð 
ð 
ð 
ð

˜DÐ!1Ô2ð 
ð 
ð 
ð 
ð 3Að
:ð 
:Øð
:Ø"*¨3¤-ð
:à	�#Œð
:ð 
:ð 
:ð 
:ð#ð #ð #ð #ð
Rð 
Rð 
Rð 
Rð	"ð 	"˜Sð 	"¨°)Ô)<ð 	"Èð 	"ð 	"ð 	"ð 	"ð	"ð 	"˜sð 	"¨8°IÔ+>ð 	"È$ð 	"ð 	"ð 	"ð 	"ð	"ð 	"˜cð 	"¨(°9Ô*=ð 	"Èð 	"ð 	"ð 	"ð 	"ðð ð ð ð ð  ˜Uð  ¨Tð  ð  ð  ð  ð¨ð °ð ð ð ð ð
àð
ð ð
ð ˜3 ˜8Ô$ð	
ð
 ð
ð ð
ð 
ð
ð 
ð 
ð 
ð.=°.ð =ÀTð =ð =ð =ð =ðØ   c Ô*ðØ39ðØEKðà	�.Ô	!ðð ð ð ð(ð (°$ð (À$ð (ð (ð (ð (ð>$ð $ð $ð $ð" ˆl˜>Ñ*Ô*€GðØðØ&.¨s°C¨xÔ&8ðØAGðØOUðà	ðð ð ð ð(°ð Àð ð ð ð ð(!¨Kð !¸Dð !ð !ð !ð !ð
 ¨,Ô!7ð 
ð 
ð 
ð 
ð!ð !ð !ð !ð+˜ %œð +ð +ð +ð +ð8>-ð >-ð >-ð >-ðB  €xÔÑ!Ô!ð a;ØÐ%Ð%Ð%àˆ
à#Ðà#Ðð	%ð 	%ð 	%ð 	%ð	Ø˜c 3˜hÔ'ð	Ø06ð	ØBHð	àð	ð 	ð 	ð 	ð	ð 	ð 	ð 	ð	&ð 	&ð 	&ð 	&ð	#ð 	#ð 	#ð 	#ð&	# :ð 	#ð 	#ð 	#ð 	#ð	JØ% c¨3 hÔ/ð	JØ8>ð	JØJPð	Jàð	Jð 	Jð 	Jð 	Jð	A¨cð 	A°dð 	Að 	Að 	Að 	Að 	Að 	Að 	Að 	Að	;Ø˜c 3˜hÔ'ð	;Ø06ð	;ØBHð	;àð	;ð 	;ð 	;ð 	;ð 	;ð 	;ð 	;ð 	;rW   rž   c                   ó¾   — e Zd ZdZdZdZdedededdfd„Z	dd	„Z
edd„¦   «         Zdd„Zdd„Zdd„Zdedee         fd„Zdeddfd„Zdeddfd„Zdefd„Zdefd„ZdS )ÚBaseConnectorzm
    Basic implementation of L{IConnector}.

    State can be: "connecting", "connected", "disconnected"
    Nr   Úfactoryr¹   r�   rJ   c                 ó>   — d| _         || _        || _        || _        d S )NÚdisconnected)rÙ   r�   rÜ  r¹   )rT   rÜ  r¹   r�   s       rU   rV   zBaseConnector.__init__Ï  s$   € ð $ˆŒ
ØˆŒØˆŒØˆŒˆˆrW   c                 ó¦   — | j         dk    r|                      ¦   «          dS | j         dk    r$| j        €J ‚| j                             ¦   «          dS dS )z!Disconnect whatever our state is.Ú
connectingÚ	connectedN)rÙ   ÚstopConnectingÚ	transportÚloseConnectionrZ   s    rU   Ú
disconnectzBaseConnector.disconnect×  sd   € àŒ:˜Ò%Ð%Ø×ÒÑ!Ô!Ð!Ð!Ð!ØŒZ˜;Ò&Ð&Ø”>Ð-Ð-Ð-ØŒN×)Ò)Ñ+Ô+Ð+Ð+Ð+ð 'Ð&rW   r=   c                 ó   — d S r    r{   rZ   s    rU   Ú_makeTransportzBaseConnector._makeTransportß  s   € àˆrW   c                 óŒ  — | j         dk    rt          d¦  «        ‚d| _         | j        s | j                             ¦   «          d| _        |                      ¦   «         | _        | j        �A| j         	                    | j        | j        j
        t          j        ¦   «         ¦  «        | _        | j                             | ¦  «         dS )z"Start connection to remote server.rÞ  zcan't connect in this staterà  r9   N)rÙ   ÚRuntimeErrorÚfactoryStartedrÜ  ÚdoStartrç  rã  r¹   r�   rÁ   ÚfailIfNotConnectedr   ÚTimeoutErrorÚ	timeoutIDÚstartedConnectingrZ   s    rU   ÚconnectzBaseConnector.connectã  sµ   € àŒ:˜Ò'Ð'ÝÐ<Ñ=Ô=Ð=à!ˆŒ
ØÔ"ð 	$ØŒL× Ò Ñ"Ô"Ð"Ø"#ˆDÔØ+/×+>Ò+>Ñ+@Ô+@ˆŒØŒ<Ð#Ø!œ\×3Ò3Ø”˜dœnÔ?ÅÔASÑAUÔAUñô ˆDŒNð 	Œ×&Ò& tÑ,Ô,Ð,Ð,Ð,rW   c                 ó¾   — | j         dk    rt          j        d¦  «        ‚| j        €J ‚d| _         | j                             t          j        ¦   «         ¦  «         | `dS )zStop attempting to connect.rà  zwe're not trying to connectNrÞ  )rÙ   r   ÚNotConnectingErrorrã  rì  Ú	UserErrorrZ   s    rU   râ  zBaseConnector.stopConnectingó  s]   € àŒ:˜Ò%Ð%ÝÔ*Ð+HÑIÔIÐIàŒ~Ð)Ð)Ð)Ø#ˆŒ
ØŒ×)Ò)­%¬/Ñ*;Ô*;Ñ<Ô<Ð<ØˆNˆNˆNrW   c                 ór   — | j         �/	 | j                              ¦   «          n# t          $ r Y nw xY w| ` d S d S r    )rî  rH   rè   rZ   s    rU   ÚcancelTimeoutzBaseConnector.cancelTimeoutý  sW   € ØŒ>Ð%ðØ”×%Ò%Ñ'Ô'Ð'Ð'øÝð ð ð Ø�ðøøøà���ð &Ð%s   ‰# £
0¯0Úaddrc                 ól   — d| _         |                      ¦   «          | j                             |¦  «        S )Nrá  )rÙ   rõ  rÜ  ÚbuildProtocol)rT   rö  s     rU   rø  zBaseConnector.buildProtocol  s1   € Ø ˆŒ
Ø×ÒÑÔÐØŒ|×)Ò)¨$Ñ/Ô/Ð/rW   Úreasonc                 óÚ   — |                       ¦   «          d | _        d| _        | j                             | |¦  «         | j        dk    r"| j                             ¦   «          d| _        d S d S ©NrÞ  r   )rõ  rã  rÙ   rÜ  ÚclientConnectionFailedÚdoStoprê  ©rT   rù  s     rU   ÚconnectionFailedzBaseConnector.connectionFailed
  sq   € Ø×ÒÑÔÐØˆŒØ#ˆŒ
ØŒ×+Ò+¨D°&Ñ9Ô9Ð9ØŒ:˜Ò'Ð'àŒL×ÒÑ!Ô!Ð!Ø"#ˆDÔÐÐð (Ð'rW   c                 ó¤   — d| _         | j                             | |¦  «         | j         dk    r"| j                             ¦   «          d| _        d S d S rû  )rÙ   rÜ  ÚclientConnectionLostrý  rê  rþ  s     rU   rv  zBaseConnector.connectionLost  sX   € Ø#ˆŒ
ØŒ×)Ò)¨$°Ñ7Ô7Ð7ØŒ:˜Ò'Ð'àŒL×ÒÑ!Ô!Ð!Ø"#ˆDÔÐÐð (Ð'rW   c                 óT   — t          t          j        | j        ¦  «        dz   ¦  «        ‚)Nz! did not implement getDestinationrK  rZ   s    rU   ÚgetDestinationzBaseConnector.getDestination  s)   € Ý!ÝŒL˜œÑ(Ô(Ð+QÑQñ
ô 
ð 	
rW   c                 ó¨   — d                      t          j        | j        ¦  «        t	          | ¦  «        | j        |                      ¦   «         ¦  «        S )Nz<{} instance at 0x{:x} {} {}>)Úformatr4   rM  r)  rŠ   rÙ   r  rZ   s    rU   r’   zBaseConnector.__repr__!  sF   € Ø.×5Ò5ÝŒL˜œÑ(Ô(Ýˆt‰HŒHØŒJØ×ÒÑ!Ô!ñ	
ô 
ð 	
rW   r“   )rJ   r=   )ru   r”   rt   rÇ   rî  rê  r2   r˜   rž   rV   rå  r   rç  rð  râ  rõ  r#   r   r'   rø  r5   rÿ  rv  r  r•   r’   r{   rW   rU   rÛ  rÛ  Ä  so  € € € € € ðð ð €IØ€NðØ$ðØ/4ðØ?Jðà	ðð ð ð ð,ð ,ð ,ð ,ð ðð ð ñ „^ðð-ð -ð -ð -ð ð ð ð ðð ð ð ð0 (ð 0¨x¸	Ô/Bð 0ð 0ð 0ð 0ð
$ wð $°4ð $ð $ð $ð $ð$ Wð $°ð $ð $ð $ð $ð
 ð 
ð 
ð 
ð 
ð

˜#ð 
ð 
ð 
ð 
ð 
ð 
rW   rÛ  c                   ór   — e Zd ZU dZdZej        ed<   dZej	        ed<   dej        fd„Z
dee         fd„ZdS )ÚBasePortziBasic implementation of a ListeningPort.

    Note: This does not actually implement IListeningPort.
    NÚaddressFamilyÚ
socketTyperJ   c                 óº   — t          j         | j        | j        ¦  «        }|                     d¦  «         t	          j        |                     ¦   «         ¦  «         |S )NF)r¿   r  r	  Úsetblockingr   Ú_setCloseOnExecÚfileno)rT   Úss     rU   ÚcreateInternetSocketzBasePort.createInternetSocket3  sH   € ÝŒM˜$Ô,¨d¬oÑ>Ô>ˆØ	�Š�eÑÔÐÝÔ˜aŸhšh™jœjÑ)Ô)Ð)ØˆrW   c                 óT   — t          dt          j        | j        ¦  «        z  ¦  «        ‚)zRaises a RuntimeErrorzdoWrite called on a %s)ré  r4   rM  r)  rZ   s    rU   ÚdoWritezBasePort.doWrite9  s"   € åÐ3µg´lÀ4Ä>Ñ6RÔ6RÑRÑSÔSÐSrW   )ru   r”   rt   rÇ   r  r¿   ÚAddressFamilyr–   r	  Ú
SocketKindr  r   r5   r  r{   rW   rU   r  r  *  sŒ   € € € € € € ðð ð
 +/€M�6Ô'Ð.Ð.Ñ.Ø$(€J�Ô!Ð(Ð(Ñ(ð f¤mð ð ð ð ðT˜ 'Ô*ð Tð Tð Tð Tð Tð TrW   r  Ú__all__)prÇ   r‚  r¿   rï   Úabcr   r   Úheapqr   r   r   Ú	tracebackr   Útypesr	   Útypingr
   r   r   r   r   r   r   r   r   r   r   r   Úzope.interfacer   r   Útwisted.internetr   r   r   r   r   r   Útwisted.internet._resolverr   r  r   rº  r    r  Útwisted.internet.deferr!   r"   Útwisted.internet.interfacesr#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   Útwisted.internet.protocolr2   Útwisted.loggerr3   Útwisted.pythonr4   Útwisted.python.failurer5   Útwisted.python.logr6   ru  Útwisted.python.runtimer7   r8   r—   r  r:   r;   r<   Útwisted.internet.tcpr=   r>   r&  Útwisted.python.threadpoolr?   rF  ÚfailureHandlerrC  r³  rö   rA   rœ   rÊ   rý   r™   r•   Ú_ThreePhaseEventTriggerrÑ   rÓ   rÿ   r  Ú_ThreadCallrž   rÛ  ÚFileDescriptorr  r  r–   r{   rW   rU   ú<module>r+     s¥  ðð
ð ð ð
 €€€Ø €€€Ø €€€Ø #Ð #Ð #Ð #Ð #Ð #Ð #Ð #Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø "Ð "Ð "Ð "Ð "Ð "Ø Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð 8Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7à IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ IÐ Iðð ð ð ð ð ð ð ð ð ð
 :Ð 9Ð 9Ð 9Ð 9Ð 9Ð 9Ð 9ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð" 4Ð 3Ð 3Ð 3Ð 3Ð 3Ø !Ð !Ð !Ð !Ð !Ð !Ø "Ð "Ð "Ð "Ð "Ð "Ø *Ð *Ð *Ð *Ð *Ð *Ø @Ð @Ð @Ð @Ð @Ð @Ø FÐ FÐ FÐ FÐ FÐ FÐ FÐ FØ QÐ QÐ QÐ QÐ QÐ QÐ QÐ QÐ QÐ Qàð ,Ø+Ð+Ð+Ð+Ð+Ð+ð &Ð %Ð %Ð %Ð %Ð %à€8ÔÑÔð Ø4Ð4Ð4Ð4Ð4Ð4Ð4à€Jà€v�x„x€ð ×!Ò!Ð"AÑBÔB€Ø×(Ò(Ð)DÑEÔEÐ Ø×)Ò)Ð*VÑWÔWÐ ð €ˆ\ÑÔðFð Fð Fð Fð Fñ Fô Fñ ÔðFðR €ˆ_ÑÔðGð Gð Gð Gð Gñ Gô Gñ ÔðGðT €ˆ_ÑÔð*ð *ð *ð *ð *ñ *ô *ñ Ôð*ð #+¨3°¨8Ô"4Ð ØØ# U¨6°3¨;Ô%7¸¸cÀ6¸kÔ9JÐJôÐ ð !( Ø#Ø	ˆ#Ð.°°f¸c°kÔ0BÀDÈÈfÈÔDUÐ
UÔVñ!ô !Ð ðG.ð G.ð G.ð G.ð G.ñ G.ô G.ð G.ðT €Ð*Ð,EÑFÔFð."ð ."ð ."ð ."ð ."ñ ."ô ."ñ GÔFð."ðb �Ð)¨5°Ð6SÐ1SÔ+TÑUÔU€Ø�H˜S #˜XÔ&¨¨f°c¨kÔ(:¸DÀÀfÀÔ<MÐMÔN€ð €ˆ\˜<Ð)FÑGÔGðw	;ð w	;ð w	;ð w	;ð w	;Ð(ñ w	;ô w	;ñ HÔGðw	;ðt €8ÔÑÔð 2Ø€O�K Ñ1Ô1Ð1ð €ˆZÑÔðb
ð b
ð b
ð b
ð b
�Cñ b
ô b
ñ Ôðb
ðJTð Tð Tð Tð TˆxÔ&ñ Tô Tð Tð( €ˆˆcŒÐ Ð Ñ Ð Ð rW   