ó
    Ö›‘hí"  ã                   ó4  • S r SSKrSSKrSSKJr  SSKJr  SSKJr  SSK	J
r
   \" \S5      r\" \S5      r\" \S	5      r\" \S
5      r\" \S5      r\" \5       " S S\R(                  \R*                  5      5       rS rSS/rg! \ a  r\" \5      eSrCff = f)zõ
An epoll() based implementation of the twisted main loop.

To install the event loop (and you should do this before any connections,
listeners or connectors are added)::

    from twisted.internet import epollreactor
    epollreactor.install()
é    N)Úimplementer)Ú	posixbase)ÚIReactorFDSet)ÚlogÚepollÚEPOLLHUPÚEPOLLERRÚEPOLLINÚEPOLLOUTc                   óp   • \ rS rSrSr\\-  r\r	\
rS rS rS rS rS rS rS	 rS
 rS rS rS r\rSrg)ÚEPollReactoré%   a7  
A reactor that uses epoll(7).

@ivar _poller: A C{epoll} which will be used to check for I/O
    readiness.

@ivar _selectables: A dictionary mapping integer file descriptors to
    instances of C{FileDescriptor} which have been registered with the
    reactor.  All C{FileDescriptors} which are currently receiving read or
    write readiness notifications will be present as values in this
    dictionary.

@ivar _reads: A set containing integer file descriptors.  Values in this
    set will be registered with C{_poller} for read readiness notifications
    which will be dispatched to the corresponding C{FileDescriptor}
    instances in C{_selectables}.

@ivar _writes: A set containing integer file descriptors.  Values in this
    set will be registered with C{_poller} for write readiness
    notifications which will be dispatched to the corresponding
    C{FileDescriptor} instances in C{_selectables}.

@ivar _continuousPolling: A L{_ContinuousPolling} instance, used to handle
    file descriptors (e.g. filesystem files) that are not supported by
    C{epoll(7)}.
c                 óâ   • [        S5      U l        [        5       U l        [        5       U l        0 U l        [        R                  " U 5      U l        [        R                  R                  U 5        g)zU
Initialize epoll object, file descriptor tracking dictionaries, and the
base class.
i   N)r   Ú_pollerÚsetÚ_readsÚ_writesÚ_selectablesr   Ú_ContinuousPollingÚ_continuousPollingÚPosixReactorBaseÚ__init__)Úselfs    ÚaC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/internet/epollreactor.pyr   ÚEPollReactor.__init__G   sP   € ô ˜T“{ˆŒÜ“eˆŒÜ“uˆŒØˆÔÜ"+×">Ò">¸tÓ"DˆÔÜ×"Ñ"×+Ñ+¨DÕ1ó    c                 óÞ   • UR                  5       nXr;  aX  UnXs;   a   X†-  nU R                  R                  Xx5        OU R                  R                  Xx5        UR	                  U5        XU'   gg)z¶
Private method for adding a descriptor from the event loop.

It takes care of adding it if  new or modifying it if already added
for another state (read -> read/write for example).
N)Úfilenor   ÚmodifyÚregisterÚadd)	r   ÚxerÚprimaryÚotherÚselectablesÚeventÚ	antieventÚfdÚflagss	            r   Ú_addÚEPollReactor._addV   sf   € ð �Z‰Z‹\ˆØÓØˆEð ‹{ØÑ"�Ø—‘×#Ñ# BÕ.à—‘×%Ñ% bÔ0ð �K‰K˜ŒOØ!˜ŠOð! r   c                 ó  •  U R                  XR                  U R                  U R                  [        [
        5        g! [         aD  nUR                  [        R                  :X  a   U R                  R                  U5         SnAge SnAff = f)zB
Add a FileDescriptor for notification of data available to read.
N)r*   r   r   r   r
   r   ÚOSErrorÚerrnoÚEPERMr   Ú	addReader)r   ÚreaderÚes      r   r0   ÚEPollReactor.addReaderp   sj   € ð	Ø�I‰IØŸ™ T§\¡\°4×3DÑ3DÄgÌxõøô ó 	Ø�w‰wœ%Ÿ+™+Ó%ð ×'Ñ'×1Ñ1°&×9Ñ9àûð	úó   ‚;> ¾
BÁ9BÂBÂBc                 ó  •  U R                  XR                  U R                  U R                  [        [
        5        g! [         aD  nUR                  [        R                  :X  a   U R                  R                  U5         SnAge SnAff = f)zC
Add a FileDescriptor for notification of data available to write.
N)r*   r   r   r   r   r
   r-   r.   r/   r   Ú	addWriter)r   Úwriterr2   s      r   r6   ÚEPollReactor.addWriter�   sk   € ð	Ø�I‰IØŸ™ d§k¡k°4×3DÑ3DÄhÔPWõøô ó 	Ø�w‰wœ%Ÿ+™+Ó%ð ×'Ñ'×1Ñ1°&×9Ñ9àûð	úr4   c                 ó  • UR                  5       nUS:X  a   UR                  5        H  u  pxXL d  M    O   gXr;   aR  Xs;   a  Un	U R                  R                  Xy5        OXG	 U R                  R	                  U5        UR                  U5        gg)z—
Private method for removing a descriptor from the event loop.

It does the inverse job of _add, and also add a check in case of the fd
has gone away.
éÿÿÿÿN)r   Úitemsr   r   Ú
unregisterÚremove)
r   r"   r#   r$   r%   r&   r'   r(   Úfdesr)   s
             r   Ú_removeÚEPollReactor._remove’   s�   € ð �Z‰Z‹\ˆØ�‹8Ø'×-Ñ-Ö/‘�Ø”;Ùñ 0ð Ø‹=Ø‹{Ø!�à—‘×#Ñ# BÕ.à�Oà—‘×'Ñ'¨Ô+Ø�N‰N˜2Õð r   c                 óò   • U R                   R                  U5      (       a  U R                   R                  U5        gU R                  XR                  U R
                  U R                  [        [        5        g)zA
Remove a Selectable for notification of data available to read.
N)	r   Ú	isReadingÚremoveReaderr?   r   r   r   r
   r   )r   r1   s     r   rC   ÚEPollReactor.removeReader«   sW   € ð ×"Ñ"×,Ñ,¨V×4Ñ4Ø×#Ñ#×0Ñ0°Ô8ØØ�‰Ø—K‘K §¡¨t×/@Ñ/@Ä'Ì8õ	
r   c                 óò   • U R                   R                  U5      (       a  U R                   R                  U5        gU R                  XR                  U R
                  U R                  [        [        5        g)zB
Remove a Selectable for notification of data available to write.
N)	r   Ú	isWritingÚremoveWriterr?   r   r   r   r   r
   )r   r7   s     r   rG   ÚEPollReactor.removeWriter¶   sW   € ð ×"Ñ"×,Ñ,¨V×4Ñ4Ø×#Ñ#×0Ñ0°Ô8ØØ�‰Ø—L‘L $§+¡+¨t×/@Ñ/@Ä(ÌGõ	
r   c                 ó  • U R                  U R                   Vs/ s H  oR                  U   PM     snU R                   Vs/ s H  oR                  U   PM     sn5      U R                  R                  5       -   $ s  snf s  snf )z4
Remove all selectables, and return a list of them.
)Ú
_removeAllr   r   r   r   Ú	removeAll©r   r(   s     r   rK   ÚEPollReactor.removeAllÁ   sr   € ð
 �O‰OØ15·²Ó=²¨2×"Ñ" 2Ô&±Ñ=Ø15·²Ó>²¨2×"Ñ" 2Ô&±Ñ>óð ×%Ñ%×/Ñ/Ó1ñ	2ð	
ùâ=ùÚ>s   šA<ÁB
c                 ó”   • U R                    Vs/ s H  oR                  U   PM     snU R                  R                  5       -   $ s  snf ©N)r   r   r   Ú
getReadersrL   s     r   rP   ÚEPollReactor.getReadersÍ   sG   € à,0¯KªKó
Ú,7 b×Ñ˜bÔ!©Kñ
à×#Ñ#×.Ñ.Ó0ñ1ð 	1ùò 
ó   �Ac                 ó”   • U R                    Vs/ s H  oR                  U   PM     snU R                  R                  5       -   $ s  snf rO   )r   r   r   Ú
getWritersrL   s     r   rT   ÚEPollReactor.getWritersÒ   sG   € à,0¯LªLó
Ú,8 b×Ñ˜bÔ!©Lñ
à×#Ñ#×.Ñ.Ó0ñ1ð 	1ùò 
rR   c                 óz  • Uc  Sn U R                   R                  U[        U R                  5      5      nU R                  nU H-  u  pV U R                  U   n[        R                  " XtXuU5        M/     g! [         a)  nUR
                  [
        R                  :X  a   SnAge SnAff = f! [         a     Mu  f = f)z!
Poll the poller for new events.
Nr:   )r   ÚpollÚlenr   r-   r.   ÚEINTRÚ_doReadOrWriter   ÚcallWithLoggerÚKeyError)r   ÚtimeoutÚlÚerrÚ_drdwr(   r&   Ú
selectables           r   ÚdoPollÚEPollReactor.doPoll×   s¶   € ð ‰?ØˆGð	ð
 —‘×!Ñ! '¬3¨t×/@Ñ/@Ó+AÓBˆAð ×#Ñ#ˆÛ‰IˆBðMØ!×.Ñ.¨rÑ2�
ô ×"Ò" :°jÀeÖLò øô ó 	Ø�y‰yœEŸK™KÓ'Üð
 ûð	ûô ó Úðús/   ‡/A6 Á
B,Á6
B)Â B$Â#B$Â$B)Â,
B:Â9B:)r   r   r   r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r	   Ú_POLL_DISCONNECTEDr
   Ú_POLL_INr   Ú	_POLL_OUTr   r*   r0   r6   r?   rC   rG   rK   rP   rT   rb   ÚdoIterationÚ__static_attributes__© r   r   r   r   %   s]   † ñð8 " HÑ,ÐØ€HØ€Iò2ò"ò4ò"ò"ò2	
ò	
ò

ò1ò
1ò
Mð> ƒKr   r   c                  ó4   • [        5       n SSKJn  U" U 5        g)z
Install the epoll() reactor.
r   )ÚinstallReactorN)r   Útwisted.internet.mainrp   )Úprp   s     r   Úinstallrs   ù   s   € ô 	‹€AÝ4á�1Õr   rs   )rh   r.   ÚselectÚzope.interfacer   Útwisted.internetr   Útwisted.internet.interfacesr   Útwisted.pythonr   Úgetattrr   r   r	   r
   r   ÚAttributeErrorr2   ÚImportErrorr   Ú_PollLikeMixinr   rs   Ú__all__rn   r   r   Ú<module>r~      sÁ   ðñó Û å &å &Ý 5Ý ðñ
 �F˜GÓ$€EÙ�v˜zÓ*€HÙ�v˜zÓ*€HÙ�f˜iÓ(€GÙ�v˜zÓ*€Hñ
 ˆ]ÓôP�9×-Ñ-¨y×/GÑ/Gó Pó ðPòfð ˜9Ð
%�øðE ó Ù
�a‹.Ðûðús   ¤-B ÂBÂ
BÂB