%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/dns/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/dns/__pycache__/_asyncio_backend.cpython-312.pyc

�

5��e#��h�dZddlZddlZddlZddlZddlZddlZddlZejdk(Z
d�ZGd�d�Zd�Z
Gd�d	ejj�ZGd
�dejj �Zej"j%d�rgddlZddlZddlZddlZej.Zej2j&j4Zdd
lmZmZmZGd�de�Z Gd�dejB�Z"nejjFZ"Gd�dejjH�Z$y)zasyncio library query support�N�win32c�r�	tj�S#t$rtj�cYSwxYw�N)�asyncio�get_running_loop�AttributeError�get_event_loop���6/usr/lib/python3/dist-packages/dns/_asyncio_backend.py�_get_running_loopr
s4��(��'�'�)�)���(��%�%�'�'�(�s��6�6c�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�_DatagramProtocolc� �d|_d|_yr)�	transport�recvfrom��selfs r�__init__z_DatagramProtocol.__init__s�������
rc��||_yr)r)rrs  r�connection_madez!_DatagramProtocol.connection_mades	��"��rc��|jr9|jj�s|jj||f�yyyr)r�done�
set_result)r�data�addrs   r�datagram_receivedz#_DatagramProtocol.datagram_received s5���=�=����!3�!3�!5��M�M�$�$�d�D�\�2�"6�=rc��|jr7|jj�s|jj|�yyyr)rr�
set_exception)r�excs  r�error_receivedz _DatagramProtocol.error_received$s1���=�=����!3�!3�!5��M�M�'�'��,�"6�=rc��|jr@|jj�s%|�	t�|jj|�yyy#t$r%}|jj|�Yd}~yd}~wwxYwr)rr�EOFErrorr)rr �es   r�connection_lostz!_DatagramProtocol.connection_lost(si���=�=����!3�!3�!5��{�3�"�N��
�
�+�+�C�0�"6�=��
 �3��M�M�/�/��2�2��3�s�A�	A<�A7�7A<c�8�|jj�yr)r�closers rr'z_DatagramProtocol.close3s�������rN)	�__name__�
__module__�__qualname__rrrr!r%r'r
rrrrs ���#�3�-�	1�rrc���K�|�	tj||��d{���S|�d{���S7�#tj$r!tjj|���wxYw7�=�w)N)�timeout)r�wait_for�TimeoutError�dns�	exception�Timeout)�	awaitabler,s  r�_maybe_wait_forr37sh������	9� �)�)�)�W�=�=�=����	>���#�#�	9��-�-�'�'��'�8�8�	9���s/�A)�0�.�0�A)�A'�A)�0�4A$�$A)c�B��eZdZ�fd�Zd�Zd�Zd�Zd�Zd�Zd�Z	�xZ
S)�DatagramSocketc�@��t�|�|�||_||_yr)�superrr�protocol)r�familyrr8�	__class__s    �rrzDatagramSocket.__init__Bs���
���� �"��� ��
rc��XK�|jj||�t|�S�wr)r�sendto�len)r�what�destinationr,s    rr<zDatagramSocket.sendtoGs$���������d�K�0��4�y��s�(*c��(K�t�j�}	|jj�J�||j_t	||��d{���|j�d|j_S7�%#d|j_wxYw�wr)r
�
create_futurer8rr3�result)r�sizer,rs    rrzDatagramSocket.recvfromLsw���� �"�0�0�2��	*��=�=�)�)�1�1�1�%)�D�M�M�"�!�$��0�0�0��;�;�=�%)�D�M�M�"�
1��&*�D�M�M�"�s.�B�8A<�A:�A<�(B�:A<�<B�Bc��@K�|jj�y�wr)r8r'rs rr'zDatagramSocket.closeWs�����
�
������c��@K�|jjd�S�w�N�peername�r�get_extra_infors r�getpeernamezDatagramSocket.getpeernameZ������~�~�,�,�Z�8�8�rEc��@K�|jjd�S�w�N�socknamerIrs r�getsocknamezDatagramSocket.getsockname]rLrEc��K�t��wr��NotImplementedError�rr,s  r�getpeercertzDatagramSocket.getpeercert`s����!�!���	)r(r)r*rr<rr'rKrPrU�
__classcell__�r:s@rr5r5As&���!�
�
	*��9�9�"rr5c�6�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	y)	�StreamSocketc�.�||_||_||_yr)r9�reader�writer)r�afr\r]s    rrzStreamSocket.__init__es����������rc��K�|jj|�t|jj�|��d{���S7��wr)r]�writer3�drain)rr>r,s   r�sendallzStreamSocket.sendalljs8���������$��$�T�[�[�%6�%6�%8�'�B�B�B�B�s�AA�A
�Ac��hK�t|jj|�|��d{���S7��wr)r3r\�read)rrCr,s   r�recvzStreamSocket.recvns(����$�T�[�[�%5�%5�d�%;�W�E�E�E�E�s�)2�0�2c��@K�|jj�y�wr)r]r'rs rr'zStreamSocket.closeqs����������rEc��@K�|jjd�S�wrG�r]rJrs rrKzStreamSocket.getpeernamet������{�{�)�)�*�5�5�rEc��@K�|jjd�S�wrNrhrs rrPzStreamSocket.getsocknamewrirEc��@K�|jjd�S�w)N�peercertrhrTs  rrUzStreamSocket.getpeercertzrirEN)
r(r)r*rrbrer'rKrPrUr
rrrZrZds'���
C�F��6�6�6rrZ�doh)�_compute_times�_expiration_for_this_attempt�
_remainingc�8��eZdZ�fd�Z	dd�Z	dd�Zd�Z�xZS)�_NetworkBackendc�z��t�|��||_||_||_||_|dk7rt
d��y)Nrz9the asyncio transport for HTTPX cannot set the local port)r7r�_local_port�	_resolver�_bootstrap_address�_familyrS)r�resolver�
local_port�bootstrap_addressr9r:s     �rrz_NetworkBackend.__init__�sH����G���)�D��%�D�N�&7�D�#�!�D�L��Q��)�O���rc���K�g}t|�\}}tjj|�r|j	|�n�|j
�|j	|j
�nnt
|�}|j}	|rtjj|�}	|jj||	|���d{���}
|
j�}|D]d}	td|�}t
|�}tj|�5tj|||���d{���}
ddd�t!
�cSt$j&�7��7�,#1swY�+xYw#t"$rY��wxYw�w)N)r9�lifetimeg@)�remote_host�remote_port�
local_host)rnr/�inet�
is_address�appendrvrprw�af_for_addressru�resolve_name�	addressesro�anyio�
fail_after�connect_tcp�_CoreAnyIOStream�	Exception�httpcore�ConnectError)r�host�portr,�
local_address�socket_optionsr��_�
expirationr9�answers�address�attempt_expiration�streams              rr�z_NetworkBackend.connect_tcp�s`�����I�*�7�3�M�A�z��x�x�"�"�4�(�� � ��&��(�(�4�� � ��!8�!8�9�$�Z�0������ � �X�X�4�4�]�C�F� $��� ;� ;���'�!<�!���$�-�-�/�	�$�
���)E�c�:�)V�&�(�);�<�G��)�)�'�2��',�'8�'8�(/�(,�'4�(�"���,�F�3�3�
��'�'�'�#��"�����!����s`�CE2�E�E2� ,E#�E�(E�)E�-E#�?E2�E�E 	�E#�#	E/�,E2�.E/�/E2c��K�t��wrrR)r�pathr,r�s    r�connect_unix_socketz#_NetworkBackend.connect_unix_socket�s����&�%�rVc��JK�tj|��d{���y7��wr)r��sleep)r�secondss  rr�z_NetworkBackend.sleep�s�����+�+�g�&�&�&���#�!�#r)r(r)r*rr�r�r�rWrXs@rrrrr�s$���		�FJ�	(�D15�	&�
	'rrrc�>��eZdZdddejd��fd�
Z�xZS)�_HTTPTransportrN)ryrzrxr9c���|�ddl}|jj�}t�|�|i|��t||||�|j_y)Nr)�dns.asyncresolver�
asyncresolver�Resolverr7rrr�_pool�_network_backend)	rryrzrxr9�args�kwargsr/r:s	        �rrz_HTTPTransport.__init__�sO�����(��,�,�5�5�7���G��d�-�f�-�*9��*�&7��+�D�J�J�'r)r(r)r*�socket�	AF_UNSPECrrWrXs@rr�r��s!����"���#�#�
	�	rr�c�>�eZdZd�Z						dd�Zd�Zd�Zd�Zd�Zy)	�Backendc��y)Nrr
rs r�namezBackend.name�s��rNc	���K�t�}	|tjk(r[tr#|�!tj
j
|�df}|	jt||||���d{���\}
}t||
|�S|tjk(rQ|�td��ttj|d|d|||||��|��d{���\}}
t|||
�St!dd|��z��7��7�'�w)Nr)r9�proto�remote_addrz'destination required for stream sockets�)�sslr9r��
local_addr�server_hostnamezunsupported socket ztype )r
r��
SOCK_DGRAM�	_is_win32r/r��
any_for_af�create_datagram_endpointrr5�SOCK_STREAM�
ValueErrorr3r�open_connectionrZrS)rr^�socktyper��sourcer?r,�ssl_contextr��looprr8�r�ws              r�make_socketzBackend.make_socket�s����!�"���v�(�(�(��V�^��(�(�-�-�b�1�1�5��(,�(E�(E�!����'�)F�)�#��I�x�"�"�i��:�:�
��+�+�
+��"�!�!J�K�K�*��'�'���N���N�#���%�$3�����F�Q�� ��A�q�)�)�!�!�e�H�:�$6�6�
�	
�5#���s%�A$C4�&C0�'A#C4�
C2�&C4�2C4c��JK�tj|��d{���y7��wr)rr�)r�intervals  rr�z
Backend.sleep	s�����m�m�H�%�%�%�r�c��y)NFr
rs r�datagram_connection_requiredz$Backend.datagram_connection_requireds��rc��tSr)r�rs r�get_transport_classzBackend.get_transport_classs���rc��6K�t||��d{���S7��wr)r3)rr2r,s   rr-zBackend.wait_fors����$�Y��8�8�8�8�s���)rNNNNN)	r(r)r*r�r�r�r�r�r-r
rrr�r��s5���������-
�^&���9rr�)%�__doc__rr��sys�dns._asyncbackendr/�
dns._features�
dns.exception�dns.inet�platformr�r
rr3�
_asyncbackendr5rZ�	_features�haver�r��httpcore._backends.anyio�httpx�AsyncNetworkBackend�_CoreAsyncNetworkBackend�	_backends�AnyIOStreamr��	dns.queryrnrorprr�AsyncHTTPTransportr��
NullTransportr�r
rr�<module>r�s��$��
�
������L�L�G�#�	�(���>� "�S�&�&�5�5� "�F6�3�$�$�1�1�6�4�=�=���e����#��'�;�;���)�)�/�/�;�;��R�R�3'�2�3'�j��1�1��*�&�&�4�4�N�=9�c���'�'�=9r

Zerion Mini Shell 1.0