ó
    ¯vKgS  ã                  ó|   • S SK Jr  S SKJr  SSKJr  SSKJrJr  / SQr	 " S S5      r
 " S	 S
5      r " S S5      rg)é    )Úannotations)ÚSequenceé   )ÚFrame)ÚExtensionNameÚExtensionParameter)Ú	ExtensionÚClientExtensionFactoryÚServerExtensionFactoryc                  óB   • \ rS rSr% SrS\S'    SS.S
S jjrSS jrS	rg)r	   é   z
Base class for extensions.

r   ÚnameN)Úmax_sizec               ó   • [         e)zÒ
Decode an incoming frame.

Args:
    frame: Incoming frame.
    max_size: Maximum payload size in bytes.

Returns:
    Decoded frame.

Raises:
    PayloadTooBig: If decoding the payload exceeds ``max_size``.

©ÚNotImplementedError)ÚselfÚframer   s      ÚZ/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/websockets/extensions/base.pyÚdecodeÚExtension.decode   s
   € ô "Ð!ó    c                ó   • [         e)z[
Encode an outgoing frame.

Args:
    frame: Outgoing frame.

Returns:
    Encoded frame.

r   )r   r   s     r   ÚencodeÚExtension.encode&   s
   € ô "Ð!r   © )r   r   r   z
int | NoneÚreturnr   )r   r   r   r   )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__r   r   Ú__static_attributes__r   r   r   r	   r	      s   ‡ ñð
 ÓØà=A÷ "÷""r   r	   c                  óF   • \ rS rSr% SrS\S'    S	S jr      S
S jrSrg)r
   é4   z2
Base class for client-side extension factories.

r   r   c                ó   • [         e)zm
Build parameters to send to the server for this extension.

Returns:
    Parameters to send to the server.

r   )r   s    r   Úget_request_paramsÚ)ClientExtensionFactory.get_request_params=   s
   € ô "Ð!r   c                ó   • [         e)a   
Process parameters received from the server.

Args:
    params: Parameters received from the server for this extension.
    accepted_extensions: List of previously accepted extensions.

Returns:
    An extension instance.

Raises:
    NegotiationError: If parameters aren't acceptable.

r   ©r   ÚparamsÚaccepted_extensionss      r   Úprocess_response_paramsÚ.ClientExtensionFactory.process_response_paramsG   s
   € ô& "Ð!r   r   N)r   zlist[ExtensionParameter])r,   úSequence[ExtensionParameter]r-   úSequence[Extension]r   r	   )	r   r   r    r!   r"   r#   r(   r.   r$   r   r   r   r
   r
   4   s8   ‡ ñð
 ÓØô"ð"à,ð"ð 1ð"ð 
÷	"r   r
   c                  ó<   • \ rS rSr% SrS\S'          SS jrSrg)	r   é]   z2
Base class for server-side extension factories.

r   r   c                ó   • [         e)a§  
Process parameters received from the client.

Args:
    params: Parameters received from the client for this extension.
    accepted_extensions: List of previously accepted extensions.

Returns:
    To accept the offer, parameters to send to the client for this
    extension and an extension instance.

Raises:
    NegotiationError: To reject the offer, if parameters received from
        the client aren't acceptable.

r   r+   s      r   Úprocess_request_paramsÚ-ServerExtensionFactory.process_request_paramsf   s
   € ô* "Ð!r   r   N)r,   r0   r-   r1   r   z*tuple[list[ExtensionParameter], Extension])r   r   r    r!   r"   r#   r5   r$   r   r   r   r   r   ]   s3   ‡ ñð
 ÓØð"à,ð"ð 1ð"ð 
4÷	"r   r   N)Ú
__future__r   Úcollections.abcr   Úframesr   Útypingr   r   Ú__all__r	   r
   r   r   r   r   Ú<module>r<      s9   ðÝ "å $å ß 6ò L€÷%"ñ %"÷P&"ñ &"÷R"ò "r   