File manager - Edit - /usr/local/CyberPanel/lib/python3.10/site-packages/tornado/__pycache__/websocket.cpython-310.pyc
Back
o �h� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl m Z ddlZddlZddl mZmZ ddlmZmZmZ ddlmZmZmZ ddlmZmZ ddlmZmZ dd lmZmZ dd l m!Z! ddlm"Z" ddl#m$Z$ dd l%m&Z& ddl'm(Z( ddl)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4 ddl5m6Z6 e*r�ddl7m8Z8 G dd� de8�Z9G dd� de8�Z:G dd� de8�Z;dZ<G dd� de=�Z>G dd� de>�Z?G dd� de=�Z@G dd � d eA�ZBG d!d"� d"ejCjD�ZEd#e,d$e,d%dfd&d'�ZFG d(d)� d)ejG�ZHG d*d+� d+eA�ZIG d,d-� d-eA�ZJG d.d/� d/eH�ZKG d0d1� d1e"jL�ZMdddddde<ddf d2e/eNejOf d3e-e2d4gdf d5e-eP d6e-e2e/deNeQf gdf d7e-e.eNe,f d8e-eP d9e-eP d:eRd;e-e0eN d<e-e! d%d=fd>d?�ZSdS )@a� Implementation of the WebSocket protocol. `WebSockets <http://dev.w3.org/html5/websockets/>`_ allow for bidirectional communication between the browser and server. WebSockets are supported in the current versions of all major browsers. This module implements the final version of the WebSocket protocol as defined in `RFC 6455 <http://tools.ietf.org/html/rfc6455>`_. .. versionchanged:: 4.0 Removed support for the draft 76 protocol version. � N)�urlparse)�Future�"future_set_result_unless_cancelled)�utf8� native_str� to_unicode)�gen� httpclient�httputil)�IOLoop�PeriodicCallback)�StreamClosedError�IOStream)�gen_log�app_log)�Resolver)�simple_httpclient)�Queue)� TCPClient)�_websocket_mask)� TYPE_CHECKING�cast�Any�Optional�Dict�Union�List� Awaitable�Callable�Tuple�Type)� TracebackType)�Protocolc @ s0 e Zd Zdedefdd�Zdedefdd�ZdS ) �_Compressor�data�returnc C � d S �N� ��selfr$ r( r( �G/usr/local/CyberPanel/lib/python3.10/site-packages/tornado/websocket.py�compress; � z_Compressor.compress�modec C r&