cjr P d dl Z d dlZd dlZ d dlZn
# e$ r dZY nw xY wddlmZ ddlmZ ddlmZ ddlm Z ddl
mZ eej ej
fZ G d d ej Z G d
dej Zd Zd
Z G d de j e j Z G d dej ZdS ) N ) constants)
exceptions) protocols)
transports)loggerc " e Zd ZdZdZdZdZdZdS )SSLProtocolState UNWRAPPEDDO_HANDSHAKEWRAPPEDFLUSHINGSHUTDOWNN)__name__
__module____qualname__r r r
r r 7/opt/alt/python311/lib64/python3.11/asyncio/sslproto.pyr
r
s' I!LGHHHHr r
c e Zd ZdZdZdZdZdS )AppProtocolState
STATE_INITSTATE_CON_MADE STATE_EOFSTATE_CON_LOSTN)r r r r r r r r r r r r s$ J%NI%NNNr r c ` | rt d t j }|sd|_ |S )Nz(Server side SSL needs a valid SSLContextF)
ValueErrorsslcreate_default_contextcheck_hostname)server_sideserver_hostname
sslcontexts r _create_transport_contextr$ / s@ ECDDD +--J *$)
!r c | ||dz }n
|}d|z }n| }||dz }n|}||cxk rdk sn t d|d|d ||fS )Ni r zhigh (z) must be >= low (z) must be >= 0)r )highlowkbhilos r add_flowcontrol_defaultsr, = s |;dBBBRBB
{
1W
====q====j""bbb" # # # r6Mr c e Zd ZdZej j Zd ZddZ d Z
d Zd Zd Z
efd Zd
Zd Zd Zdd
Zd Zd ZddZd Zd Zed Zd Zd Zd Zd Zd Zd Z d Z!dS )_SSLProtocolTransportTc 0 || _ || _ d| _ d S )NF)_loop
_ssl_protocol_closed)selfloopssl_protocols r __init__z_SSLProtocolTransport.__init__X s
)r Nc 8 | j || S )z#Get optional transport information.)r1 _get_extra_infor3 namedefaults r get_extra_infoz$_SSLProtocolTransport.get_extra_info] s !11$@@@r c : | j | d S N)r1 _set_app_protocol)r3 protocols r set_protocolz"_SSLProtocolTransport.set_protocola s ,,X66666r c | j j S r> )r1
_app_protocolr3 s r get_protocolz"_SSLProtocolTransport.get_protocold s !//r c | j S r> )r2 rD s r
is_closingz _SSLProtocolTransport.is_closingg s
|r c f | j s"d| _ | j dS d| _ dS )a
Close the transport.
Buffered data will be flushed asynchronously. No more data
will be received. After all buffered data is flushed, the
protocol's connection_lost() method will (eventually) called
with None as its argument.
TN)r2 r1 _start_shutdownrD s r closez_SSLProtocolTransport.closej s> | &DL..00000!%Dr c \ | j s$d| _ | dt d S d S )NTz9unclosed transport