ó
    ¶®iG  ã                   óp   • S r SSKJrJrJr  SSKJrJrJr  SSK	J
r
  SSKJr  SSKJr  Sr " S	 S
5      rSrg)z.
wsproto
~~~~~~~

A WebSocket implementation.
é    )Ú	GeneratorÚOptionalÚUnioné   )Ú
ConnectionÚConnectionStateÚConnectionType)ÚEvent)ÚH11Handshake)ÚHeadersz1.2.0c                   ó¦   • \ rS rSrSrS\SS4S jr\S\4S j5       r	S\
S	\\\4   SS4S
 jrS\S\4S jrS\\   SS4S jrS\\SS4   4S jrSrg)ÚWSConnectioné   zF
Represents the local end of a WebSocket connection to a remote peer.
Úconnection_typeÚreturnNc                 ó`   • U[         R                  L U l        [        U5      U l        SU l        g)z�
Constructor

:param wsproto.connection.ConnectionType connection_type: Controls
    whether the library behaves as a client or as a server.
N)r	   ÚCLIENTÚclientr   Ú	handshakeÚ
connection)Úselfr   s     Ú=C:\des-py\RoboSAPF\venv\Lib\site-packages\wsproto/__init__.pyÚ__init__ÚWSConnection.__init__   s)   € ð &¬×)>Ñ)>Ð>ˆŒÜ% oÓ6ˆŒØ04ˆ�ó    c                 ót   • U R                   c  U R                  R                  $ U R                   R                  $ )zG
:returns: Connection state
:rtype: wsproto.connection.ConnectionState
)r   r   Ústate©r   s    r   r   ÚWSConnection.state!   s.   € ð �?‰?Ñ"Ø—>‘>×'Ñ'Ð'Ø�‰×$Ñ$Ð$r   ÚheadersÚpathc                 ó:   • U R                   R                  X5        g )N)r   Úinitiate_upgrade_connection)r   r    r!   s      r   r#   Ú(WSConnection.initiate_upgrade_connection+   s   € ð 	�‰×2Ñ2°7ÕAr   Úeventc                 óÒ   • SnU R                   c:  X R                  R                  U5      -  nU R                  R                   U l         U$ X R                   R                  U5      -  nU$ )aS  
Generate network data for the specified event.

When you want to communicate with a WebSocket peer, you should construct
an event and pass it to this method. This method will return the bytes
that you should send to the peer.

:param wsproto.events.Event event: The event to generate data for
:returns bytes: The data to send to the peer
r   )r   r   Úsend)r   r%   Údatas      r   r'   ÚWSConnection.send0   s`   € ð ˆØ�?‰?Ñ"Ø—N‘N×'Ñ'¨Ó.Ñ.ˆDØ"Ÿn™n×7Ñ7ˆDŒOð ˆð —O‘O×(Ñ(¨Ó/Ñ/ˆDØˆr   r(   c                 óÂ   • U R                   c7  U R                  R                  U5        U R                  R                   U l         gU R                   R                  U5        g)zÕ
Feed network data into the connection instance.

After calling this method, you should call :meth:`events` to see if the
received data triggered any new events.

:param bytes data: Data received from remote peer
N)r   r   Úreceive_data)r   r(   s     r   r+   ÚWSConnection.receive_dataC   sC   € ð �?‰?Ñ"Ø�N‰N×'Ñ'¨Ô-Ø"Ÿn™n×7Ñ7ˆD�Oà�O‰O×(Ñ(¨Õ.r   c              #   ó¸   #   • U R                   R                  5        Sh  v•N   U R                  b#  U R                  R                  5        Sh  v•N   gg N5 N7f)zt
A generator that yields pending events.

Each event is an instance of a subclass of
:class:`wsproto.events.Event`.
N)r   Úeventsr   r   s    r   r.   ÚWSConnection.eventsR   sJ   é € ð —>‘>×(Ñ(Ó*×*Ð*Ø�?‰?Ñ&Ø—‘×-Ñ-Ó/×/Ñ/ð 'ñ 	+á/ùs!   ‚A A¡.AÁAÁAÁA)r   r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r	   r   Úpropertyr   r   r   r   ÚbytesÚstrr#   r
   r'   r   r+   r   r.   Ú__static_attributes__© r   r   r   r      s¡   † ñð	5¨ð 	5¸4ô 	5ð ð%�ó %ó ð%ðBØðBØ&+¨E°3¨JÑ&7ðBà	ôBð
˜%ð  Eô ð&/ ¨%¡ð /°Tô /ð	0˜	 %¨¨tÐ"3Ñ4÷ 	0r   r   )r	   r   N)r4   Útypingr   r   r   r   r   r   r	   r.   r
   r   r   r   Ú__version__r   Ú__all__r9   r   r   Ú<module>r=      s:   ðñ÷ .Ñ -ç CÑ CÝ Ý #Ý à€÷J0ñ J0ðZ -�r   