AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/twisted/internet/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/twisted/internet/__pycache__/epollreactor.cpython-310.pyc
o

�b�"�
@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
zeed�Zeed�Z
eed	�Zeed
�Zeed�ZWneyMZzee��dZ[wwee�Gdd
�d
ejej��Zdd�Zd
dgZdS)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@s|eZdZdZeeBZeZe	Z
dd�Zdd�Zdd�Z
dd	�Zd
d�Zdd
�Zdd�Zdd�Zdd�Zdd�Zdd�ZeZdS)�EPollReactora�
    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)}.
    cCs<td�|_t�|_t�|_i|_t�|�|_tj	�
|�dS)zm
        Initialize epoll object, file descriptor tracking dictionaries, and the
        base class.
        iN)r�_poller�set�_reads�_writes�_selectablesr�_ContinuousPolling�_continuousPolling�PosixReactorBase�__init__��self�r�?/usr/lib/python3/dist-packages/twisted/internet/epollreactor.pyrGs
zEPollReactor.__init__c	Cs\|��}||vr,|}||vr||O}|j�||�n|j�||�|�|�|||<dSdS)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�flagsrrr�_addVs
�zEPollReactor._addc
C�dz|�||j|j|jtt�WdSty1}z|jtjkr%|j	�
|�n�WYd}~dSd}~ww)zR
        Add a FileDescriptor for notification of data available to read.
        N)r%rrrr	r
�OSError�errno�EPERMr�	addReader)r�reader�errrr*p�
����zEPollReactor.addReaderc
Cr&)zS
        Add a FileDescriptor for notification of data available to write.
        N)r%rrrr
r	r'r(r)r�	addWriter)r�writerr,rrrr.�r-zEPollReactor.addWriterc
Csz|��}|dkr|��D]
\}}||urnqdS||vr;||vr+|}	|j�||	�n	||=|j�|�|�|�dSdS)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)
rrrrr r!r"r#�fdesr$rrr�_remove�s��zEPollReactor._removecC�:|j�|�r|j�|�dS|�||j|j|jtt�dS)zQ
        Remove a Selectable for notification of data available to read.
        N)	r�	isReading�removeReaderr5rrrr	r
)rr+rrrr8���zEPollReactor.removeReadercCr6)zR
        Remove a Selectable for notification of data available to write.
        N)	r�	isWriting�removeWriterr5rrrr
r	)rr/rrrr;�r9zEPollReactor.removeWritercs6���fdd��jD��fdd��jD���j��S)zD
        Remove all selectables, and return a list of them.
        c�g|]}�j|�qSr�r��.0r#rrr�
<listcomp>��z*EPollReactor.removeAll.<locals>.<listcomp>cr<rr=r>rrrr@�rA)�
_removeAllrrr�	removeAllrrrrrC�s���zEPollReactor.removeAllc��fdd��jD��j��S)Ncr<rr=r>rrrr@��
�z+EPollReactor.getReaders.<locals>.<listcomp>)rr�
getReadersrrrrrF��

��zEPollReactor.getReaderscrD)Ncr<rr=r>rrrr@�rEz+EPollReactor.getWriters.<locals>.<listcomp>)rr�
getWritersrrrrrH�rGzEPollReactor.getWritersc
Cs�|durd}z|j�|t|j��}Wnty,}z|jtjkr'WYd}~dS�d}~ww|j}|D]\}}z|j|}Wn	tyFYq2wt	�
|||||�q2dS)z1
        Poll the poller for new events.
        Nr0)r�poll�lenrr'r(�EINTR�_doReadOrWrite�KeyErrorr�callWithLogger)r�timeout�l�err�_drdwr#r!�
selectablerrr�doPoll�s&��	��zEPollReactor.doPollN)�__name__�
__module__�__qualname__�__doc__rr�_POLL_DISCONNECTEDr	�_POLL_INr
�	_POLL_OUTrr%r*r.r5r8r;rCrFrHrT�doIterationrrrrr%s"rcCst�}ddlm}||�dS)z&
    Install the epoll() reactor.
    r)�installReactorN)r�twisted.internet.mainr])�pr]rrr�install�sr`)rXr(�select�zope.interfacer�twisted.internetr�twisted.internet.interfacesr�twisted.pythonr�getattrrrrr	r
�AttributeErrorr,�ImportErrorr�_PollLikeMixinrr`�__all__rrrr�<module>s,




��T

Anon7 - 2022
AnonSec Team