o
    ùT·j
  ã                   @  s‚   d dl mZ d dlZejrd dlZddlmZ G dd„ deƒZG dd„ deƒZ	G d	d
„ d
eƒZ
G dd„ deƒZG dd„ deƒZdS )é    )ÚannotationsNé   )ÚResponsec                   @  ó   e Zd ZdZdS )ÚHTTPXWSExceptionz,
    Base exception class for HTTPX WS.
    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   ú`/home/dinkstrade/pdmp-scanner/venv/lib/python3.10/site-packages/httpx2/websockets/_exceptions.pyr      ó    r   c                   @  ó   e Zd ZdZd	dd„ZdS )
ÚWebSocketUpgradeErrorz]
    Raised when the initial connection didn't correctly upgrade to a WebSocket session.
    Úresponser   ÚreturnÚNonec                 C  ó
   || _ d S ©N)r   )Úselfr   r   r   r   Ú__init__   ó   
zWebSocketUpgradeError.__init__N)r   r   r   r   ©r   r	   r
   r   r   r   r   r   r   r      ó    r   c                   @  s   e Zd ZdZddd
d„ZdS )ÚWebSocketDisconnectzù
    Raised when the server closed the WebSocket session.

    Args:
        code:
            The integer close code to indicate why the connection has closed.
        reason:
            Additional reasoning for why the connection has closed.
    éè  NÚcodeÚintÚreasonú
str | Noner   r   c                 C  s   || _ |pd| _d S )NÚ )r   r   )r   r   r   r   r   r   r   %   s   zWebSocketDisconnect.__init__)r   N)r   r   r   r    r   r   r   r   r   r   r   r      s    
r   c                   @  r   )
ÚWebSocketInvalidTypeReceivedz;
    Raised when an event is not of the expected type.
    Úeventúwsproto.events.Eventr   r   c                 C  r   r   )r#   )r   r#   r   r   r   r   /   r   z%WebSocketInvalidTypeReceived.__init__N)r#   r$   r   r   r   r   r   r   r   r"   *   r   r"   c                   @  r   )ÚWebSocketNetworkErrorzl
    Raised when a network error occured,
    typically if the underlying stream has closed or timeout.
    Nr   r   r   r   r   r%   3   r   r%   )Ú
__future__r   ÚtypingÚTYPE_CHECKINGÚwsprotoÚ_modelsr   Ú	Exceptionr   r   r   r"   r%   r   r   r   r   Ú<module>   s    		