File: //usr/local/CyberCP/lib/python3.10/site-packages/websockets/__pycache__/exceptions.cpython-310.pyc
o
�h2 � @ s� d Z ddlmZ ddlZddlmZ g d�ZG dd� de�ZG d d
� d
e�Z G dd� de �Z
G d
d� de �ZG dd� de�ZG dd� de�Z
G dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d!d"� d"e�ZG d#d$� d$e�ZG d%d&� d&e�ZG d'd(� d(e�ZG d)d*� d*e�ZG d+d,� d,e�ZG d-d.� d.e�ZG d/d0� d0e�ZG d1d2� d2e�ZG d3d4� d4e�ZG d5d6� d6e�ZG d7d8� d8ee �Z!G d9d:� d:ee"�Z#dd;l$m%Z%m&Z& ee'� d<d<d<d<d=�d>� dS )?aU
:mod:`websockets.exceptions` defines the following hierarchy of exceptions.
* :exc:`WebSocketException`
* :exc:`ConnectionClosed`
* :exc:`ConnectionClosedOK`
* :exc:`ConnectionClosedError`
* :exc:`InvalidURI`
* :exc:`InvalidProxy`
* :exc:`InvalidHandshake`
* :exc:`SecurityError`
* :exc:`ProxyError`
* :exc:`InvalidProxyMessage`
* :exc:`InvalidProxyStatus`
* :exc:`InvalidMessage`
* :exc:`InvalidStatus`
* :exc:`InvalidStatusCode` (legacy)
* :exc:`InvalidHeader`
* :exc:`InvalidHeaderFormat`
* :exc:`InvalidHeaderValue`
* :exc:`InvalidOrigin`
* :exc:`InvalidUpgrade`
* :exc:`NegotiationError`
* :exc:`DuplicateParameter`
* :exc:`InvalidParameterName`
* :exc:`InvalidParameterValue`
* :exc:`AbortHandshake` (legacy)
* :exc:`RedirectHandshake` (legacy)
* :exc:`ProtocolError` (Sans-I/O)
* :exc:`PayloadTooBig` (Sans-I/O)
* :exc:`InvalidState` (Sans-I/O)
* :exc:`ConcurrencyError`
� )�annotationsN� )�lazy_import)�WebSocketException�ConnectionClosed�ConnectionClosedOK�ConnectionClosedError�
InvalidURI�InvalidProxy�InvalidHandshake�
SecurityError�
ProxyError�InvalidProxyMessage�InvalidProxyStatus�InvalidMessage�
InvalidStatus�
InvalidHeader�InvalidHeaderFormat�InvalidHeaderValue�
InvalidOrigin�InvalidUpgrade�NegotiationError�DuplicateParameter�InvalidParameterName�InvalidParameterValue�
ProtocolError�
PayloadTooBig�InvalidState�ConcurrencyErrorc @ � e Zd ZdZdS )r z?
Base class for all exceptions defined by websockets.
N��__name__�
__module__�__qualname__�__doc__� r% r% �H/usr/local/CyberCP/lib/python3.10/site-packages/websockets/exceptions.pyr I � r c @ sD e Zd ZdZ ddd
d�Zdd
d�Zeddd��Zeddd��ZdS )r a
Raised when trying to interact with a closed connection.
Attributes:
rcvd: If a close frame was received, its code and reason are available
in ``rcvd.code`` and ``rcvd.reason``.
sent: If a close frame was sent, its code and reason are available
in ``sent.code`` and ``sent.reason``.
rcvd_then_sent: If close frames were received and sent, this attribute
tells in which order this happened, from the perspective of this
side of the connection.
N�rcvd�frames.Close | None�sent�rcvd_then_sent�bool | None�return�Nonec C s8 || _ || _|| _| jd u | j d u p| jd u ksJ �d S �N�r( r* r+ )�selfr( r* r+ r% r% r&