+
    O|j_g  ã            +      ó
  € ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	H
t
Ht ^ RIHt ^ RIHtHtHtHt ^ RIt^ RIt^RIHt ^RIHt ^RIHt ^R	IHt ^R
IHt ^RIH t H!t!H"t" ^RI#H$t$H%t%H&t& ^RI'H(t( ^RIH)t)H*t*H+t+H,t, ^RI-H.t. ^RI/H0t0H1t1 ^RI-H2t2 . R.Ot3 ! R R]04      t4 ! R R]Pj                  Pl                  4      t7R/RRRRRRRRRRRRRRRRRRR RR!RR"] R#^
R$^R%^R&^
R'R0R(^R)RR*RR+]Pp                  /R, R- lllt9R# )1é    )ÚannotationsN)Ú	AwaitableÚMappingÚSequence)ÚTracebackType)ÚAnyÚCallableÚ	CoroutineÚSelf)Ú
basic_auth)ÚServerExtensionFactory)Ú enable_server_permessage_deflate)Ú	CloseCode)Úvalidate_subprotocols)ÚSERVERÚRequestÚResponse)Ú
CONNECTINGÚOPENÚEvent)ÚServerProtocol)Ú
LoggerLikeÚOriginÚ
StatusLikeÚSubprotocol)Úget_socket_name)Ú
ConnectionÚ	broadcast)Úrace_eventsÚServerConnectionÚServerc                  óz   a € ] tR t^&tRtR^R^R^
R^/R V 3R llltR R	 ltR
R
]3R R lltR V 3R llt	Rt
V ;t# )r    aT  
:mod:`trio` implementation of a WebSocket server connection.

:class:`ServerConnection` provides :meth:`recv` and :meth:`send` methods for
receiving and sending messages.

It supports asynchronous iteration to receive messages::

    async for message in websocket:
        await process(message)

The iterator exits normally when the connection is closed with close code
1000 (OK) or 1001 (going away) or without a close code. It raises a
:exc:`~websockets.exceptions.ConnectionClosedError` when the connection is
closed with any other code.

The ``ping_interval``, ``ping_timeout``, ``close_timeout``, and
``max_queue`` arguments have the same meaning as in :func:`serve`.

Args:
    nursery: Trio nursery.
    stream: Trio stream connected to a WebSocket client.
    protocol: Sans-I/O connection.
    server: Server that manages this connection.

Úping_intervalÚping_timeoutÚclose_timeoutÚ	max_queuec               ó<   € V ^8„  d   QhRRRRRRRRR	R
RR
RR
RRRR/	# )é   Únurseryztrio.NurseryÚstreamútrio.abc.StreamÚprotocolr   Úserverr!   r#   úfloat | Noner$   r%   r&   ú*int | None | tuple[int | None, int | None]ÚreturnÚNone© )Úformats   "ÚOC:\Users\alokc\chatbot\backend\venv\Lib\site-packages\websockets/trio/server.pyÚ__annotate__ÚServerConnection.__annotate__B   sd   € ÷ /ñ /àð/ð  ð/ð !ð	/ð
 ð/ð $ð/ð #ð/ð $ð/ð >ð/ð 
ñ/ó    c          
     	ó„   <€ V  \         S	V `  VVVVVVVR 7       W@n        \        P                  ! 4       V n        V  V  V  R# )©r#   r$   r%   r&   N)ÚsuperÚ__init__r-   Útrior   Úrequest_rcvd)
Úselfr)   r*   r,   r-   r#   r$   r%   r&   Ú	__class__s
   &&&&&$$$$€r4   r;   ÚServerConnection.__init__B   sM   ø€ ñ 	Ü‰ÑØØØØ'Ø%Ø'Øð 	ô 	
ð ŒÜ(,¯
ª
«ˆÔÙÙÛr7   c               ó$   € V ^8„  d   QhRRRRRR/# )r(   Ústatusr   ÚtextÚstrr0   r   r2   )r3   s   "r4   r5   r6   ^   s!   € ÷ 2ñ 2˜jð 2°ð 2¸ñ 2r7   c                ó8   € V P                   P                  W4      # )a¥  
Create a plain text HTTP response.

``process_request`` and ``process_response`` may call this method to
return an HTTP response instead of performing the WebSocket opening
handshake.

You can modify the response before returning it, for example by changing
HTTP headers.

Args:
    status: HTTP status code.
    text: HTTP response body; it will be encoded to UTF-8.

Returns:
    HTTP response to send to the client.

)r,   Úreject)r>   rB   rC   s   &&&r4   ÚrespondÚServerConnection.respond^   s   € ð& �}‰}×#Ñ# FÓ1Ð1r7   Nc               ó(   € V ^8„  d   QhRRRRRRRR/# )	r(   Úprocess_requestúZCallable[[ServerConnection, Request], Awaitable[Response | None] | Response | None] | NoneÚprocess_responseúdCallable[[ServerConnection, Request, Response], Awaitable[Response | None] | Response | None] | NoneÚserver_headerú
str | Noner0   r1   r2   )r3   s   "r4   r5   r6   s   s:   € ÷ Y?ñ Y?ððY?ððY?ð  "ð!Y?ð" 
ñ#Y?r7   c              ƒ  óÄ  "  € \        V P                  V P                  4      G Rj  x€L
  V P                  Ee   RpVe4    V! W P                  4      p\	        V\
        4      '       d   VG Rj  x€L
 pVf,   V P                  P                  V P                  4      V n        M\	        V\"        4      '       g   Q hW@n        Ve   W0P                   P$                  R&   RpVe?    V! W P                  V P                   4      p\	        V\
        4      '       d   VG Rj  x€L
 pVe   \	        V\"        4      '       g   Q hW@n        V P                   P&                  \        P                  P(                  8X  dV   V P*                  P,                  '       d:   V P                  P                  \        P                  P.                  R4      V n        V P0                  \2        J d_   V P5                  \2        R	7      ;_uu_4       GRj  x€L
  V P                  P7                  V P                   4       RRR4      GRj  x€L
  R# R# R#  EL ELÕ  \         dm   pYPP                  n        T P                  P                  RRR7       T P                  P                  \        P                  P                  R4      p Rp?ELERp?ii ; i EL¥  \         dm   pYPP                  n        T P                  P                  RRR7       T P                  P                  \        P                  P                  R4      p Rp?ELRp?ii ; i EL= EL  + GRj  x€L 
 '       g   i     R# ; i5i)
z!
Perform the opening handshake.

Nzprocess_request failedT©Úexc_infozLFailed to open a WebSocket connection.
See server log for more information.
r!   zprocess_response failedzServer is shutting down.
)Úexpected_state)r   r=   Ústream_closedÚrequestÚ
isinstancer   Ú	Exceptionr,   Úhandshake_excÚloggerÚerrorrF   ÚhttpÚ
HTTPStatusÚINTERNAL_SERVER_ERRORÚacceptÚresponser   ÚheadersÚstatus_codeÚSWITCHING_PROTOCOLSr-   ÚclosingÚSERVICE_UNAVAILABLEÚstater   Úsend_contextÚsend_response)r>   rJ   rL   rN   r_   Úexcs   &&&&  r4   Ú	handshakeÚServerConnection.handshakes   s€  é € ô, ˜$×+Ñ+¨T×-?Ñ-?Ó@×@Ð@à�<‰<Ó#ØˆHàÒ*ðÙ.¨t·\±\ÓB�HÜ! (¬I×6Ò6Ø)1§>˜ð ÒØ $§¡× 4Ñ 4°T·\±\Ó B�•ä! (¬H×5Ò5Ð5Ð5Ø (”àÒ(Ø2?—‘×%Ñ% hÑ/àˆHàÒ+ðÙ/°·l±lÀDÇMÁMÓR�HÜ! (¬I×6Ò6Ø)1§>˜ð Ò#Ü! (¬H×5Ò5Ð5Ð5Ø (”ð —‘×)Ñ)¬T¯_©_×-PÑ-PÔPØ—K‘K×'×'Ð'à $§¡× 4Ñ 4Ü—O‘O×7Ñ7Ø0ó!�”ð �z‰zœZÓ'Ø×,Ñ,¼JÐ,×G×GÕGØ—M‘M×/Ñ/°·±Ô>÷ H×GÑGñ (ñ $ò 	Aò $2øÜ ô 	Ø25—M‘MÔ/Ø—K‘K×%Ñ%Ð&>ÈÐ%ÔNØ#Ÿ}™}×3Ñ3ÜŸ™×=Ñ=ðEó –Hûð	úò4 $2øÜ ô 	Ø25—M‘MÔ/Ø—K‘K×%Ñ%Ð&?È$Ð%ÔOØ#Ÿ}™}×3Ñ3ÜŸ™×=Ñ=ðEó –Hûð	ú÷: H×G×G×GüsÚ   ‚$M ¦I §M Á-I Á.IÁ/I Á3A/M Ã#8K ÄK ÄK Ä A0M ÆA/M È L=ÈM È&MÈ*M È5M È6M ÉI ÉJ=ÉA!J8Ê2M Ê8J=Ê=M Ë K ËL:ËA!L5Ì/M Ì5L:Ì:M Í M ÍM	Í	MÍ

M	ÍM	Í	M c               ó    € V ^8„  d   QhRRRR/# )r(   Úeventr   r0   r1   r2   )r3   s   "r4   r5   r6   Î   s   € ÷ )ñ ) 5ð )¨Tñ )r7   c                ó¶   <€ V P                   f;   \        V\        4      '       g   Q hWn         V P                  P	                  4        R# \
        SV `  V4       R# )z
Process one incoming event.

N)rU   rV   r   r=   Úsetr:   Úprocess_event)r>   rl   r?   s   &&€r4   ro   ÚServerConnection.process_eventÎ   sH   ø€ ð �<‰<ÒÜ˜e¤W×-Ò-Ð-Ð-Ø ŒLØ×Ñ×!Ñ!Ö#ô ‰GÑ! %Ö(r7   )rU   r=   r_   r-   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r;   rG   r   ri   ro   Ú__static_attributes__Ú__classcell__)r?   s   @r4   r    r    &   s_   ø† ñð6/ð ')ð/ð &(ð/ð ')ð/ð AC÷/ò /õ82ð: ð Ø$*÷!Y?÷v)ö )r7   c                  ó¨   € ] tR t^ÝtRtRR R llt]R R l4       t]P                  3R R llt
R	]P                  R
3R R lltR R ltR R ltRtR# )r!   aj  
WebSocket server returned by :func:`serve`.

Args:
    listeners: List of Trio listeners accepting new connections.
    handler: Handler for one connection. It receives a Trio stream.
    logger: Logger for this server.
        It defaults to ``logging.getLogger("websockets.server")``.
        See the :doc:`logging guide <../../topics/logging>` for details.

Nc               ó(   € V ^8„  d   QhRRRRRRRR/# )	r(   Ú	listenerszlist[trio.SocketListener]Úhandlerz6Callable[[trio.abc.Stream], Coroutine[Any, Any, None]]rY   úLoggerLike | Noner0   r1   r2   )r3   s   "r4   r5   ÚServer.__annotate__ê   s3   € ÷ ñ à,ðð Hðð "ð	ð
 
ñr7   c                	ó¾   € Wn         W n        Vf   \        P                  ! R4      pW0n        \        4       V n        \        P                  ! 4       V n	        RV n
        R # )Nzwebsockets.serverF)rz   r{   ÚloggingÚ	getLoggerrY   rn   Úall_connectionsr<   r   Úhandlers_waiterrc   )r>   rz   r{   rY   s   &&&&r4   r;   ÚServer.__init__ê   sL   € ð #ŒØŒØŠ>Ü×&Ò&Ð':Ó;ˆFØŒô 7:³eˆÔô  $Ÿzšz›|ˆÔàˆŽr7   c               ó   € V ^8„  d   QhRR/# )r(   r0   zset[ServerConnection]r2   )r3   s   "r4   r5   r}      s   € ÷ 
ñ 
Ð2ñ 
r7   c                ó„   € V P                    Uu0 uF%  pVP                  P                  \        J g   K#  VkK'  	  up# u upi )zÜ
Set of active connections.

This property contains all connections that completed the opening
handshake successfully and didn't start the closing handshake yet.
It can be useful in combination with :func:`~broadcast`.

)r�   r,   re   r   )r>   Ú
connections   & r4   ÚconnectionsÚServer.connectionsÿ   sE   € ð #×2Ò2ó
á2�
Ø×"Ñ"×(Ñ(¬DÐ0÷ ˆJÙ2ñ
ð 	
ùò 
s   � =´=c               ó    € V ^8„  d   QhRRRR/# )r(   Útask_statusútrio.TaskStatus[Server]r0   r1   r2   )r3   s   "r4   r5   r}     s   € ÷ #ñ #à,ð#ð 
ñ#r7   c              ƒ  	ó*  "  € \         P                  ! 4       ;_uu_4       GR j  x€L
 V n        \         P                  ! 4       ;_uu_4       GR j  x€L
 V n        V P                  P	                  \
        P                  ! \         P                  V P                  V P                  V P                  R7      4      G R j  x€L
  V P                   F2  pV P                  P                  R\        VP                  4      4       K4  	  VP                  V 4       R R R 4      GR j  x€L
  R R R 4      GR j  x€L
  V P                  P!                  4        R #  EL+ EL L™ L8  + GR j  x€L 
 '       g   i     LO; i LF  + GR j  x€L 
 '       g   i     L]; i5i)N)Úhandler_nurseryzserver listening on %s)r<   Úopen_nurseryr�   Úserve_nurseryÚstartÚ	functoolsÚpartialÚserve_listenersr{   rz   rY   Úinfor   ÚsocketÚstartedr‚   rn   )r>   rŠ   Úlisteners   && r4   Úserve_foreverÚServer.serve_forever  s  é € ô ×$Ò$×&×&Ô&¨$Ô*>ô ×(Ò(×*×*Ô*¨dÔ.@Ø×(Ñ(×.Ñ.Ü×%Ò%Ü×,Ñ,ØŸ™ØŸ™Ø(,×(<Ñ(<ô	ó÷ ð ð !%§¤�HØ—K‘K×$Ñ$Ø0ô (¨¯©Ó8ö	ñ !/ð ×#Ñ# DÔ)÷! +×*÷ '×&ð* 	×Ñ× Ñ Ö"ò+ 'ò +ñ÷ +×*×*Ò*ú÷ '×&×&Ò&üs¬   ‚"F¤E¥F¨'E7ÁEÁE7ÁA(E	Â;EÂ<AE	ÄE7ÄEÄE7Ä#FÄ.E5Ä/!FÅE7ÅE	ÅE7ÅE2ÅE"Å 
E2Å+E2Å-E7Å5FÅ7F	Å=F Å>
F	Æ	F	ÆFTÚ c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r(   Úclose_connectionsÚboolÚcodezCloseCode | intÚreasonrD   r0   r1   r2   )r3   s   "r4   r5   r}   1  s2   € ÷ **ñ **àð**ð ð**ð ð	**ð
 
ñ**r7   c              ƒ  óÚ  "  € V P                   P                  R4       V P                  P                  P	                  4        RV n        V'       dZ   V P                   FI  pVP                  P                  \        J g   K#  V P                  P                  VP                  W#4       KK  	  V P                  P                  4       G Rj  x€L
  V P                   P                  R4       R#  L!5i)aq  
Close the server.

* Close the TCP listeners.
* When ``close_connections`` is :obj:`True`, which is the default,
  close existing connections. Specifically:

  * Reject opening WebSocket connections with an HTTP 503 (service
    unavailable) error. This happens when the server accepted the TCP
    connection but didn't complete the opening handshake before closing.
  * Close open WebSocket connections with close code 1001 (going away).
    ``code`` and ``reason`` can be customized, for example to use code
    1012 (service restart).

* Wait until all connection handlers have returned.

:meth:`aclose` is idempotent.

zserver closingTNzserver closed)rY   r”   r�   Úcancel_scopeÚcancelrc   r�   r,   re   r   r�   Ú
start_soonÚacloser‚   Úwait)r>   rœ   rž   rŸ   r†   s   &&&& r4   r¤   ÚServer.aclose1  s³   é € ð2 	�‰×ÑÐ)Ô*ð 	×Ñ×'Ñ'×.Ñ.Ô0ð ˆŒ÷ Ø"×2Ô2�
Ø×&Ñ&×,Ñ,´Õ4Ø×(Ñ(×3Ñ3°J×4EÑ4EÀtÖTñ 3ð
 ×"Ñ"×'Ñ'Ó)×)Ð)à�‰×Ñ˜Ö)ñ 	*ùs   ‚A9C+Â AC+ÃC)Ã"C+c               ó   € V ^8„  d   QhRR/# )r(   r0   r   r2   )r3   s   "r4   r5   r}   ]  s   € ÷ ñ  $ñ r7   c              ƒ  	ó   "  € V # 5i©Nr2   )r>   s   &r4   Ú
__aenter__ÚServer.__aenter__]  s
   é € Øˆùs   ‚c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r(   Úexc_typeztype[BaseException] | NoneÚ	exc_valuezBaseException | NoneÚ	tracebackzTracebackType | Noner0   r1   r2   )r3   s   "r4   r5   r}   `  s2   € ÷ ñ à,ðð (ðð (ð	ð
 
ñr7   c              ƒ  	óB   "  € V P                  4       G R j  x€L
  R #  L5ir©   )r¤   )r>   r­   r®   r¯   s   &&&&r4   Ú	__aexit__ÚServer.__aexit__`  s   é € ð �k‰k‹m×Ôùs   ‚–—)r�   rc   r{   r�   r‚   rz   rY   r�   r©   )rq   rr   rs   rt   ru   r;   Úpropertyr‡   r<   ÚTASK_STATUS_IGNOREDr˜   r   Ú
GOING_AWAYr¤   rª   r±   rv   r2   r7   r4   r!   r!   Ý   sW   † ñ
÷ð* ô
ó ð
ð" 04×/GÑ/G÷#ðH #'Ø )× 4Ñ 4Ø÷	**õX÷ñ r7   ÚhostÚbacklogrz   ÚsslÚoriginsÚ
extensionsÚsubprotocolsÚselect_subprotocolÚcompressionÚdeflaterJ   rL   rN   Úopen_timeoutr#   r$   r%   Úmax_sizer&   rY   Úcreate_connectionrŠ   c          0     óx   € V ^8„  d   QhRRRRRRRRRR	R
RRRRRRRRRRRRRRRRRRRRRRRRRR R!R"R!R#R$R%R&R'R(R)R*/# )+r(   r{   z-Callable[[ServerConnection], Awaitable[None]]Úportz
int | Noner¶   zstr | bytes | Noner·   rz   z list[trio.SocketListener] | Noner¸   zssl_module.SSLContext | Noner¹   z0Sequence[Origin | re.Pattern[str] | None] | Nonerº   z'Sequence[ServerExtensionFactory] | Noner»   zSequence[Subprotocol] | Noner¼   zNCallable[[ServerConnection, Sequence[Subprotocol]], Subprotocol | None] | Noner½   rO   rJ   rK   rL   rM   rN   r¿   r.   r#   r$   r%   rÀ   r/   r&   rY   r|   rÁ   ztype[ServerConnection] | NonerŠ   r‹   r0   r1   r2   )r3   s   "r4   r5   r5   i  s(  € ÷ i8ñ i8Ø:ði8à
ði8ð
 ði8ð ði8ð 0ði8ð 
&ði8ð >ði8ð 8ði8ð /ði8ð	ði8ð( ð)i8ð.	ð/i8ð<	ð=i8ðH ðIi8ðL ðMi8ðN  ðOi8ðP ðQi8ðR  ðSi8ðV 9ðWi8ðX :ðYi8ð\ ð]i8ð` 5ðai8ðd )ðei8ðf 
ñgi8r7   c             ƒ  óú  a aaaaa	aaaaaaaaaaaa"  € Se   \        S4       V
R8X  d   \        S4      oMV
e   \        RV
 24      hSf   \        oVf1   Vf   \        R4      h\        P
                  ! WVR7      G Rj  x€L
 pM-Ve   \        R4      hVe   \        R4      hVe   \        R4      hR	 VVVV VVVVVVVVVV	VVVV3R
 llp\        VVS4      oSP                  VR7      G Rj  x€L
  R#  Lu L5i)a­  
Create a WebSocket server listening on ``port``.

Whenever a client connects, the server creates a :class:`ServerConnection`,
performs the opening handshake, and delegates to the ``handler`` coroutine.

The handler receives the :class:`ServerConnection` instance, which you can
use to send and receive messages.

Once the handler completes, either normally or with an exception, the server
performs the closing handshake and closes the connection.

When using :func:`serve` with :meth:`nursery.start <trio.Nursery.start>`,
you get back a :class:`Server` object. Treat it as an asynchronous context
manager to ensure that the server will be closed gracefully::

    from websockets.trio.server import serve

    async def handler(websocket):
        ...

    # set this event to exit the server
    stop = trio.Event()

    with trio.open_nursery() as nursery:
        server = await nursery.start(serve, handler, port)
        async with server:
            await stop.wait()

Alternatively, to stop the server gracefully, call its
:meth:`~Server.aclose` method::

    with trio.open_nursery() as nursery:
        server = await nursery.start(serve, handler, port)
        try:
            await stop.wait()
        finally:
            await server.aclose()

Args:
    handler: Connection handler. It receives the WebSocket connection,
        which is a :class:`ServerConnection`, in argument.
    port: TCP port the server listens on.
        See :func:`~trio.open_tcp_listeners` for details.
    host: Network interfaces the server binds to.
        See :func:`~trio.open_tcp_listeners` for details.
    backlog: Listen backlog. See :func:`~trio.open_tcp_listeners` for
        details.
    listeners: Preexisting TCP listeners. ``listeners`` replaces ``port``,
        ``host``, and ``backlog``. See :func:`trio.serve_listeners` for
        details.
    ssl: Configuration for enabling TLS on the connection.
    origins: Acceptable values of the ``Origin`` header, for defending
        against Cross-Site WebSocket Hijacking attacks. Values can be
        :class:`str` to test for an exact match or regular expressions
        compiled by :func:`re.compile` to test against a pattern. Include
        :obj:`None` in the list if the lack of an origin is acceptable.
    extensions: List of supported extensions, in order in which they
        should be negotiated and run.
    subprotocols: List of supported subprotocols, in order of decreasing
        preference.
    select_subprotocol: Callback for selecting a subprotocol among
        those supported by the client and the server. It receives a
        :class:`ServerConnection` (not a
        :class:`~websockets.server.ServerProtocol`!) instance and a list of
        subprotocols offered by the client. Other than the first argument,
        it has the same behavior as the
        :meth:`ServerProtocol.select_subprotocol
        <websockets.server.ServerProtocol.select_subprotocol>` method.
    compression: The "permessage-deflate" extension is enabled by default.
        Set ``compression`` to :obj:`None` to disable it. See the
        :doc:`compression guide <../../topics/compression>` for details.
    process_request: Intercept the request during the opening handshake.
        Return an HTTP response to force the response or :obj:`None` to
        continue normally. When you force an HTTP 101 Continue response, the
        handshake is successful. Else, the connection is aborted.
        ``process_request`` may be a function or a coroutine.
    process_response: Intercept the response during the opening handshake.
        Return an HTTP response to force the response or :obj:`None` to
        continue normally. When you force an HTTP 101 Continue response, the
        handshake is successful. Else, the connection is aborted.
        ``process_response`` may be a function or a coroutine.
    server_header: Value of  the ``Server`` response header.
        It defaults to ``"Python/x.y.z websockets/X.Y"``. Setting it to
        :obj:`None` removes the header.
    open_timeout: Timeout for opening connections in seconds.
        :obj:`None` disables the timeout.
    ping_interval: Interval between keepalive pings in seconds.
        :obj:`None` disables keepalive.
    ping_timeout: Timeout for keepalive pings in seconds.
        :obj:`None` disables timeouts.
    close_timeout: Timeout for closing connections in seconds.
        :obj:`None` disables the timeout.
    max_size: Maximum size of incoming messages in bytes.
        :obj:`None` disables the limit. You may pass a ``(max_message_size,
        max_fragment_size)`` tuple to set different limits for messages and
        fragments when you expect long messages sent in short fragments.
    max_queue: High-water mark of the buffer where frames are received.
        It defaults to 16 frames. The low-water mark defaults to ``max_queue
        // 4``. You may pass a ``(high, low)`` tuple to set the high-water
        and low-water marks. If you want to disable flow control entirely,
        you may set it to ``None``, although that's a bad idea.
    logger: Logger for this server.
        It defaults to ``logging.getLogger("websockets.server")``.
        See the :doc:`logging guide <../../topics/logging>` for details.
    create_connection: Factory for the :class:`ServerConnection` managing
        the connection. Set it to a wrapper or a subclass to customize
        connection handling.
    task_status: For compatibility with :meth:`nursery.start
        <trio.Nursery.start>`.

Nr¾   zunsupported compression: z/port is required when listeners is not provided)r¶   r·   z#port is incompatible with listenersz#host is incompatible with listenersz&backlog is incompatible with listenersc               ó    € V ^8„  d   QhRRRR/# )r(   r*   r+   r0   r1   r2   )r3   s   "r4   r5   Úserve.<locals>.__annotate__)  s   € ÷ e5ñ e5 _ð e5¸ñ e5r7   c              “  óü  <a"  € \         P                  ! 4       ;_uu_4       GRj  x€L
 p Sf   \         P                  ! 4       M\         P                  ! S4      ;_uu_ 4        SeV   \         P                  ! V SRRR7      p \        V \         P                  4      '       g   Q h V P                  4       G Rj  x€L
  RpSe   R VV3R llp\        SSSVSS	R7      pS! VV VSSSSS
R7      oSP                  SSS4      G Rj  x€L
  RRR4       SP                  P                  \        Jd,   SP                  4       G Rj  x€L
   RRR4      GRj  x€L
  R# SP                  P                  S4       SP!                  4         S! S4      G Rj  x€L
  SP#                  4       G Rj  x€L
  SP                  P/                  S4       RRR4      GRj  x€L
  R#  ELµ EL&  \         P                   d     RRR4       RRR4      GRj  x€L 
  R# i ; i EL  + '       g   i     EL; i Lê LÛ LŸ L‰  \$         dI    SP&                  P)                  RRR	7       SP#                  \*        P,                  4      G Rj  x€L 
   LÙi ; i  SP                  P/                  S4       i ; i  \$         d$    \         P0                  ! T 4      G Rj  x€L 
   ELi ; i EL  + GRj  x€L 
 '       g   i     R# ; i5i)
zÝ
Handle the lifecycle of a WebSocket connection.

Since this coroutine doesn't have a caller that can handle
exceptions, it attempts to log relevant ones.

It guarantees that the TCP connection is closed before exiting.

NT)Úserver_sideÚhttps_compatiblec               ó$   € V ^8„  d   QhRRRRRR/# )r(   r,   r   r»   zSequence[Subprotocol]r0   zSubprotocol | Noner2   )r3   s   "r4   r5   Ú3serve.<locals>.stream_handler.<locals>.__annotate__U  s+   € ÷ Pñ PØ&4ðPà*?ðPð 0ñPr7   c                óF   <€ Sf   Q hV SP                   J g   Q hS! SV4      # r©   )r,   )r,   r»   r†   r¼   s   &&€€r4   Úprotocol_select_subprotocolÚBserve.<locals>.stream_handler.<locals>.protocol_select_subprotocolU  s2   ø€ ð
 $6Ò#AÐAÐ#Aà#+¨z×/BÑ/BÓ#BÐBÐ#BÙ#5°jÀ,Ó#OÐOr7   )r¹   rº   r»   r¼   rÀ   rY   r9   zconnection handler failedrQ   )r<   rŽ   ÚCancelScopeÚ
fail_afterÚ	SSLStreamrV   Údo_handshakeÚBrokenResourceErrorr   ri   r,   re   r   Úclose_streamr�   ÚaddÚstart_keepaliver¤   rW   rY   rZ   r   ÚINTERNAL_ERRORÚdiscardÚaclose_forcefully)r*   r)   rÍ   r,   r†   r%   rÁ   rº   r{   rY   r&   rÀ   r¿   r¹   r#   r$   rJ   rL   r¼   r-   rN   r¸   r»   s   &   @€€€€€€€€€€€€€€€€€€r4   Ústream_handlerÚserve.<locals>.stream_handler)  s¹  ùé € ô ×$Ò$×&×&Ô&¨'ðZ5ð $Ò+ô ×$Ò$Ô&äŸš¨Ó6÷7ñ 7ð
 ’ô "&§¢Ø"ØØ(,Ø-1ô	"˜ô  *¨&´$·.±.×AÒAÐAÐAð#Ø"(×"5Ñ"5Ó"7×7Ð7ð ð 0ð *Ò5÷Pñ Pô  .Ø 'Ø#-Ø%1Ø+FØ!)Ø%ô �Hñ "3ØØØ ØØ&3Ø%1Ø&3Ø"+ô	"�Jð %×.Ñ.Ø'Ø(Ø%ó÷ ð ÷}7ðH ×&Ñ&×,Ñ,´DÓ8Ø$×1Ñ1Ó3×3Ð3Ø÷U '×&Ñ&ðX ×&Ñ&×*Ñ*¨:Ô6Ø×*Ñ*Ô,ð?Ù! *Ó-×-Ð-ð
 %×+Ñ+Ó-×-Ð-à×*Ñ*×2Ñ2°:Ô>÷m '×&Ô&ò( 8øÜ#×7Ñ7ô #Ø"÷%7÷	 '×&Ò&ð*#úòZ÷}7÷ 7ð 7úñJ 4ñS 'ñ^ .ñ
 .øô	 !ô FØ×%Ñ%×+Ñ+Ð,GÐRVÐ+ÔWØ$×+Ñ+¬I×,DÑ,DÓE×EÓEðFûð ×*Ñ*×2Ñ2°:Õ>ûäô 5ô ×,Ò,¨VÓ4×4Ô4ð5ú÷q '×&×&Ô&üsx  „"K<¦G§K<ªK¬7J+Á#AH	Â%G!Â8GÂ9G!Â=AH	ÄHÄH	Ä	9J+ÅH-ÅJ+ÅK<ÅH/ÅK<Å+J+ÆH5ÆH1ÆH5ÆJÆ)H3Æ*JÆ.J+Ç	K<ÇKÇK<ÇG!Ç!HÇ6H	Ç7J+Ç?K<È
HÈK<ÈHÈH	ÈH*È$
J+È/K<È1H5È3JÈ5A
JÉ?J
Ê JÊJÊJÊJÊJ(Ê(J+Ê+$KËK
ËKËKËKËKËK<ËK9	Ë%K(Ë&
K9	Ë1K9	Ë3	K<)rŠ   )r   r   Ú
ValueErrorr    r<   Úopen_tcp_listenersr!   r˜   )r{   rÃ   r¶   r·   rz   r¸   r¹   rº   r»   r¼   r½   rJ   rL   rN   r¿   r#   r$   r%   rÀ   r&   rY   rÁ   rŠ   rÚ   r-   s   f&$$$ddddd$ddddddddddd$ @r4   ÚserverÞ   i  s  ÿÿùé € ðN ÒÜ˜lÔ+à�iÔÜ5°jÓA‰
Ø	Ò	 ÜÐ4°[°MÐBÓCÐCàÒ Ü,Ðð ÒØŠ<ÜÐNÓOÐOÜ×1Ò1°$È7ÔS×S‰	àÒÜÐBÓCÐCØÒÜÐBÓCÐCØÒÜÐEÓFÐF÷e5÷ e5÷ e5ñ e5ôP �I˜~¨vÓ6€FØ
×
Ñ
¨;Ð
Ó
7×7Ò7ñe Tñd 8ùs%   ”A-C;ÂC7ÂA.C;Ã0C9Ã1C;Ã9C;)r   rÞ   r    r!   r   r©   i   ):Ú
__future__r   r‘   r[   r   Úrer¸   Ú
ssl_moduleÚcollections.abcr   r   r   Útypesr   Útypingr   r	   r
   r   r<   Útrio.abcÚasyncio.serverr   Úextensions.baser   Úextensions.permessage_deflater   Úframesr   r`   r   Úhttp11r   r   r   r,   r   r   r   r-   r   r   r   r   r   Úutilsr   r†   r   r   r   Ú__all__r    ÚabcÚAsyncResourcer!   r´   rÞ   r2   r7   r4   Ú<module>rï      sš  ðÝ "ã Û Û Û 	Û ß 8Ñ 8Ý ß 1Ó 1ã Û å 'Ý 4Ý LÝ Ý +ß .Ñ .ß .Ñ .Ý #ß @Ó @Ý #ß -Ý ò€ôt)�zô t)ônIˆT�X‰X×#Ñ#ô IñXi8ð
  $ði8ð ði8ð 37ði8ð )-ði8ð AEði8ð ;?ði8ð 26ði8ð& 	ð'i8ð( (ð)i8ð8 	ð9i8ðF 	ðGi8ðH !'ðIi8ðL "$ðMi8ðN #%ðOi8ðP "$ðQi8ðR #%ðSi8ðV <AðWi8ðX =?ðYi8ð\ !%ð]i8ð` 8<ðai8ðd ,0×+CÑ+C÷ei8ò i8r7   