| Server IP : 138.197.107.151 / Your IP : 216.73.217.120 Web Server : Apache/2.4.58 (Ubuntu) System : Linux BloxBy-Builder 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : wpbetasites_mrakzqskir ( 1022) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/wsproto/__pycache__/ |
Upload File : |
�
M1cG � �p � d Z ddlmZmZmZ ddlmZmZmZ ddl m
Z
ddlmZ ddlm
Z
dZ G d � d
� ZdZy)
z.
wsproto
~~~~~~~
A WebSocket implementation.
� )� Generator�Optional�Union� )�
Connection�ConnectionState�ConnectionType)�Event)�H11Handshake)�Headersz1.2.0c � � e Zd ZdZdeddfd�Zedefd�� Zde de
eef ddfd �Z
d
edefd�Zdee ddfd
�Zdeeddf fd�Zy)�WSConnectionzN
Represents the local end of a WebSocket connection to a remote peer.
�connection_type�returnNc �` � |t j u | _ t |� | _ d| _ y)z�
Constructor
:param wsproto.connection.ConnectionType connection_type: Controls
whether the library behaves as a client or as a server.
N)r �CLIENT�clientr � handshake�
connection)�selfr s �2/usr/lib/python3/dist-packages/wsproto/__init__.py�__init__zWSConnection.__init__ s) � � &��)>�)>�>���%�o�6���04��� c �r � | j �| j j S | j j S )z_
:returns: Connection state
:rtype: wsproto.connection.ConnectionState
)r r �state�r s r r zWSConnection.state! s. � � �?�?�"��>�>�'�'�'����$�$�$r �headers�pathc �<