Your IP : 18.216.161.178
o
6��f� � @ s$ d Z dZddlZddlZddlZddlZddlZddlZddlZzddl Z W n e
y1 dZ Y nw ddlmZ ddlm
Z
ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ dd� ZG dd� dej�ZG dd� dejej�ZG dd� de�ZG dd� de�ZdS )z�Event loop using a selector and related classes.
A selector is a "notify-when-ready" multiplexer. For a subclass which
also includes support for signal handling, see the unix_events sub-module.
)�BaseSelectorEventLoop� N� )�base_events)� constants)�events)�futures)� protocols)�sslproto)�
transports)�trsock)�loggerc C s2 z| � |�}W n
ty Y dS w t|j|@ �S �NF)�get_key�KeyError�boolr )�selector�fdZevent�key� r �>/opt/alt/python310/lib64/python3.10/asyncio/selector_events.py�_test_selector_event s �r c s� e Zd ZdZdS� fdd� ZdSddd�dd�Z dSddddejd �d
d�Z dTdd
�Z � fdd�Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdddejfdd�Zdddejfdd�Zddejfdd �Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� Zd/d0� Zd1d2� Zd3d4� ZdSd5d6�Zd7d8� Zd9d:� Zd;d<� Z d=d>� Z!d?d@� Z"dAdB� Z#dCdD� Z$dSdEdF�Z%dGdH� Z&dIdJ� Z'dKdL� Z(dMdN� Z)dOdP� Z*dQdR� Z+� Z,S )Ur zJSelector event loop.
See events.EventLoop for API specification.
Nc sF t � �� |d u r
t�� }t�d|jj� || _| � � t
�� | _d S )NzUsing selector: %s)
�super�__init__� selectorsZDefaultSelectorr �debug� __class__�__name__� _selector�_make_self_pipe�weakrefZWeakValueDictionary�_transports)�selfr �r r r r 1 s
zBaseSelectorEventLoop.__init__��extra�serverc C � t | |||||�S �N)�_SelectorSocketTransport)r! �sock�protocol�waiterr$ r% r r r �_make_socket_transport; s
�z,BaseSelectorEventLoop._make_socket_transportF)�server_side�server_hostnamer$ r% �ssl_handshake_timeoutc C s0 t j| |||||| d�}
t| ||
||d� |
jS )N)r/ r# )r ZSSLProtocolr( Z_app_transport)r! Zrawsockr* �
sslcontextr+ r- r. r$ r% r/ Zssl_protocolr r r �_make_ssl_transport@ s ��z)BaseSelectorEventLoop._make_ssl_transportc C r&