Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
base.cpython-313.pyc89 linesDownload Raw Back to __pycache__
1�

2p�j���|�SSKJr SSKJr SSKJr SSKJrJr /SQr	"SS5r3"S	S45r"SS5rg
)�)�annotations)�Sequence�)�Frame)�
ExtensionName�ExtensionParameter)�	Extension�ClientExtensionFactory�ServerExtensionFactoryc�B�\rSrSr%SrS\S'SS.S5SjjrSSjrS	rg)r	�z6Base class for extensions.7 8r�nameN)�max_sizec��[e)z�9Decode an incoming frame.10 11Args:12    frame: Incoming frame.13    max_size: Maximum payload size in bytes.14 15Returns:16    Decoded frame.17 18Raises:19    PayloadTooBig: If decoding the payload exceeds ``max_size``.20 21��NotImplementedError)�self�framers   �`D:\code\apps\devtools\python\user_packages\Python313\site-packages\websockets/extensions/base.py�decode�Extension.decodes22��"�!�c��[e)z[23Encode an outgoing frame.24 25Args:26    frame: Outgoing frame.27 28Returns:29    Encoded frame.30 31r)rrs  r�encode�Extension.encode&s32��"�!r�)rrrz33int | None�returnr)rrrr)	�__name__�34__module__�__qualname__�__firstlineno__�__doc__�__annotations__rr�__static_attributes__rrrr	r	s���35���=A�"�""rr	c�F�\rSrSr%SrS\S'S	SjrS36SjrSrg)r37�4z238Base class for client-side extension factories.39 40rrc��[e)zm41Build parameters to send to the server for this extension.42 43Returns:44    Parameters to send to the server.45 46r)rs r�get_request_params�)ClientExtensionFactory.get_request_params=s47��"�!rc��[e)a 48Process parameters received from the server.49 50Args:51    params: Parameters received from the server for this extension.52    accepted_extensions: List of previously accepted extensions.53 54Returns:55    An extension instance.56 57Raises:58    NegotiationError: If parameters aren't acceptable.59 60r�r�params�accepted_extensionss   r�process_response_params�.ClientExtensionFactory.process_response_paramsGs61��&"�!rrN)r�Sequence[ExtensionParameter])r,r0r-�Sequence[Extension]rr	)	rrr r!r"r#r(r.r$rrrr62r634s8���64���"�"�,�"�1�"�65�	"rr66c�<�\rSrSr%SrS\S'SSjrSrg)	r�]z267Base class for server-side extension factories.68 69rrc��[e)a�70Process parameters received from the client.71 72Args:73    params: Parameters received from the client for this extension.74    accepted_extensions: List of previously accepted extensions.75 76Returns:77    To accept the offer, parameters to send to the client for this78    extension and an extension instance.79 80Raises:81    NegotiationError: To reject the offer, if parameters received from82        the client aren't acceptable.83 84rr+s   r�process_request_params�-ServerExtensionFactory.process_request_paramsfs85��*"�!rrN)r,r0r-r1rz*tuple[list[ExtensionParameter], Extension])rrr r!r"r#r5r$rrrrr]s3���86���"�,�"�1�"�874�	"rrN)
�88__future__r�collections.abcr�framesr�typingrr�__all__r	r89rrrr�<module>r<s9��"�$��6�L��%"�%"�P&"�&"�R"�"r
codekingpro/portable-devtools · Team Ai