
    osj	                        d dl mZ d dlZej                  r
d dlZddlmZ  G d de      Z G d de      Z	 G d	 d
e      Z
 G d de      Z G d de      Zy)    )annotationsN   )Responsec                      e Zd ZdZy)HTTPXWSExceptionz,
    Base exception class for HTTPX WS.
    N__name__
__module____qualname____doc__     P/root/.hermes/venv/lib/python3.12/site-packages/httpx2/websockets/_exceptions.pyr   r      s    r   r   c                      e Zd ZdZddZy)WebSocketUpgradeErrorz]
    Raised when the initial connection didn't correctly upgrade to a WebSocket session.
    c                    || _         y N)response)selfr   s     r   __init__zWebSocketUpgradeError.__init__   s	     r   N)r   r   returnNoner	   r
   r   r   r   r   r   r   r   r      s    !r   r   c                      e Zd ZdZdddZy)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.
    Nc                (    || _         |xs d| _        y )N )codereason)r   r   r   s      r   r   zWebSocketDisconnect.__init__%   s    	lr   )i  N)r   intr   z
str | Noner   r   r   r   r   r   r   r      s    #r   r   c                      e Zd ZdZddZy)WebSocketInvalidTypeReceivedz:
    Raised when a event is not of the expected type.
    c                    || _         y r   )event)r   r$   s     r   r   z%WebSocketInvalidTypeReceived.__init__/   s	    
r   N)r$   zwsproto.events.Eventr   r   r   r   r   r   r"   r"   *   s    r   r"   c                      e Zd ZdZy)WebSocketNetworkErrorzl
    Raised when a network error occured,
    typically if the underlying stream has closed or timeout.
    Nr   r   r   r   r&   r&   3   s    r   r&   )
__future__r   typingTYPE_CHECKINGwsproto_modelsr   	Exceptionr   r   r   r"   r&   r   r   r   <module>r-      sZ    " 	"y !, !#* # #3 , r   