| Server IP : 3.138.164.131 / Your IP : 216.73.216.136 Web Server : Apache System : Linux ns1.techtime.me 4.18.0-147.8.1.el8.lve.1.x86_64 #1 SMP Mon Jun 29 09:55:57 EDT 2020 x86_64 User : injazaat ( 1471) PHP Version : 8.1.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3.6/site-packages/dns/__pycache__/ |
Upload File : |
3
SYAc�J � @ s� d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z
ddlZ
ddlZ
ddl
Z
ddlZ
ddlZ
ddlmZmZ ejd-kr�eZnejZejZG dd� de
jj�ZG d d
� d
e
jj�Zdd� Zd
d� Zdd� Zdd� Z dd� Z!e"ed�r�ea#nea#dd� Z$dd� Z%dd� Z&dd� Z'd.d d!�Z(d"d#� Z)d$d%� Z*d&d'� Z+d/d(d)�Z,e
j-j.e
j/j0ddddd*dddddde
j1j2fd+d,�Z3dS )0zTalk to a DNS server.� )�
generatorsN� )�long�string_types� c @ s e Zd ZdZdS )�UnexpectedSourcez=A DNS query response came from an unexpected address or port.N)�__name__�
__module__�__qualname__�__doc__� r r �/usr/lib/python3.6/query.pyr , s r c @ s e Zd ZdZdS )�BadResponsez<A DNS query response does not respond to the question asked.N)r r r
r r r r r
r 1 s r c C s | d krd S t j � | S d S )N)�time)�timeoutr r r
�_compute_expiration6 s r c C sj d}|r|t jO }|r |t jO }|r.|t jO }t j� }|j| |� |rZ|jt|d ��}n|j� }t|�S )aq Poll polling backend.
@param fd: File descriptor
@type fd: int
@param readable: Whether to wait for readability
@type readable: bool
@param writable: Whether to wait for writability
@type writable: bool
@param timeout: Deadline timeout (expiration time, in seconds)
@type timeout: float
@return True on success, False on timeout
r i� )�selectZPOLLINZPOLLOUTZPOLLERR�poll�registerr �bool)�fd�readable�writable�errorr Z
event_maskZpollableZ
event_listr r r
� _poll_for= s
r c C sr g g g }}}|r| g}|r$| g}|r.| g}|dkrLt j |||�\}} }
nt j ||||�\}} }
t|pn| pn|
�S )as Select polling backend.
@param fd: File descriptor
@type fd: int
@param readable: Whether to wait for readability
@type readable: bool
@param writable: Whether to wait for writability
@type writable: bool
@param timeout: Deadline timeout (expiration time, in seconds)
@type timeout: float
@return True on success, False on timeout
N)r r )r r r r r ZrsetZwsetZxsetZrcountZwcountZxcountr r r
�_select_for\ s r c C s� d}x�|s�|d krd }n|t j � }|dkr4tjj�yt| ||||�sNtjj�W n6 tk
r� } z|jd tjkrv|�W Y d d }~X nX d}qW d S )NFg r T) r �dns� exceptionZTimeout�_polling_backend�select_error�args�errnoZEINTR)r r r r �
expiration�doner �er r r
� _wait_fory s r% c C s | a dS )z#
Internal API. Do not use.
N)r )�fnr r r
�_set_polling_backend� s r'