+
    üÐj5  ã                  ó^  € R t ^ RIHt ^ RIHtHt ^ RIHtHtH	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 ^ R
IHt ^ RIHtHt ^ RIHt ^ RIHt ^ RI H!t!H"t" ^ RI#H$t$ ^ RI%H&t& ^ RI'H(t(H)t)H*t* ^ RI+H,t, ]	! RRR7      t-Rt. ! R R]&4      t/ ! R R]&4      t0 ]1! R4       ^ RI2H3t3H4t4H5t5H6t6H7t7H8t8H9t9 ] ! R R]64      4       t: ! R R ]8]:,          4      t; ! R! R"]5]:,          4      t<] ! R$ R%]]-,          4      4       t>]! ].R&4       ! R' R(]4      4       t?R)#   ]= d    R#t. L;i ; i)*z%
Tests for L{twisted.web.websocket}.
)Úannotations)Ú	dataclassÚfield)ÚAnyÚGenericÚTypeVar)ÚskipIf)Úimplementer)ÚDeferred)ÚConnectionDone)ÚIPushProducer)ÚAccumulatingProtocolÚMemoryReactorClock)ÚFailure)ÚConnectionCompleterÚIOPump)ÚSynchronousTestCase)ÚBAD_REQUEST)ÚAgentÚreadBody)ÚIRequest)ÚResource)ÚNOT_DONE_YETÚRequestÚSite)ÚDataÚWSPÚWebSocketProtocol)ÚboundFc                  ó"   € ] tR t^"tR R ltRtR# )ÚWeirdResourcec               ó    € V ^8„  d   QhRRRR/# )é   Úrequestr   ÚreturnÚbytes© )Úformats   "ÚA/usr/lib/python3/dist-packages/twisted/web/test/test_websocket.pyÚ__annotate__ÚWeirdResource.__annotate__#   s   € ÷ ñ  'ð ¨eñ ó    c                ó(   € VP                  ^f4       R# )aw  
Per U{the wsproto documentation
<https://python-hyper.org/projects/wsproto/en/latest/api.html#wsproto.events.RejectConnection.has_body>}:

    - The only scenario in which the caller receives a RejectConnection
      with C{has_body == False} is if the peer violates sends an
      informational status code (1xx) other than 101

This is a weird edge case so we provoke it.
r+   )ÚsetResponseCode©Úselfr#   s   &&r(   Ú
render_GETÚWeirdResource.render_GET#   s   € ð 	×Ñ Ô$Ùr+   r&   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r0   Ú__static_attributes__r&   r+   r(   r    r    "   s   † ÷ñ r+   r    c                  ó&   € ] tR t^2tRtR R ltRtR# )ÚDelayedResponsez®
A resource that will not respond to a C{GET} request right away.  You will
need to use the C{request.write(b'RESPONSE BODY')} and C{request.finish()}
to trigger a response.
c               ó    € V ^8„  d   QhRRRR/# )r"   r#   r   r$   Úintr&   )r'   s   "r(   r)   ÚDelayedResponse.__annotate__9   s   € ÷ ñ  'ð ¨cñ r+   c                	ó   € Wn         \        # ©N)r#   r   r.   s   &&r(   r0   ÚDelayedResponse.render_GET9   s   € ØŒÜÐr+   )r#   N)r2   r3   r4   r5   Ú__doc__r0   r6   r&   r+   r(   r8   r8   2   s   † ñ÷ñ r+   r8   Úwsproto)ÚConnectionRejectedÚWebSocketClientEndpointÚWebSocketClientFactoryr   ÚWebSocketResourceÚWebSocketServerFactoryÚWebSocketTransportc                  ó¦   € ] tR t^Mt$ Rt]! ]R7      tR]R&   Rt	R]R&   R R	 lt
R
 R ltR R ltR R ltR R ltR R ltR R ltR R ltRtR# )ÚMyWSPzg
Used to implement both client-side and server-side WebSocket
application that will help with testing.
©Údefault_factoryzlist[bytes]ÚpongsNzFailure | NoneÚwasLostc               ó    € V ^8„  d   QhRRRR/# )r"   Ú	transportrF   r$   ÚNoner&   )r'   s   "r(   r)   ÚMyWSP.__annotate__W   s   € ÷ 	'ñ 	'Ð0Bð 	'Àtñ 	'r+   c                	ó   € Wn         R # r=   )rN   )r/   rN   s   &&r(   ÚnegotiationStartedÚMyWSP.negotiationStartedW   s   € Ø&ŽNr+   c               ó   € V ^8„  d   QhRR/# ©r"   r$   rO   r&   )r'   s   "r(   r)   rP   Z   s   € ÷ 	ñ 	¨ñ 	r+   c                	ó   € R # r=   r&   ©r/   s   &r(   ÚnegotiationFinishedÚMyWSP.negotiationFinishedZ   s   € Ùr+   c               ó    € V ^8„  d   QhRRRR/# )r"   Úreasonr   r$   rO   r&   )r'   s   "r(   r)   rP   ]   s   € ÷ 	"ñ 	"¨ð 	"°Tñ 	"r+   c                	ó   € Wn         R # r=   )rL   )r/   r[   s   &&r(   ÚconnectionLostÚMyWSP.connectionLost]   s   € Ø!ŽLr+   c               ó    € V ^8„  d   QhRRRR/# )r"   Údatar%   r$   rO   r&   )r'   s   "r(   r)   rP   `   s   € ÷ 	.ñ 	.¨Uð 	.°tñ 	.r+   c                	ó„   € VR 8X  d   V P                   P                  R4       R# V P                  P                  V4       R# )ó   requestó    responseÿN)rN   ÚsendBytesMessageÚ	bDeferredÚcallback©r/   r`   s   &&r(   ÚbytesMessageReceivedÚMyWSP.bytesMessageReceived`   s/   € Ø�zÔ!Ø—‘×/Ñ/Ð0GÖHà—‘×'Ñ'¨Ö-r+   c               ó    € V ^8„  d   QhRRRR/# )r"   r`   Ústrr$   rO   r&   )r'   s   "r(   r)   rP   f   s   € ÷ 	-ñ 	-¨Cð 	-°Dñ 	-r+   c                	ó„   € VR 8X  d   V P                   P                  R4       R# V P                  P                  V4       R# )r#   ÚresponseN)rN   ÚsendTextMessageÚdeferredrf   rg   s   &&r(   ÚtextMessageReceivedÚMyWSP.textMessageReceivedf   s.   € Ø�yÔ Ø—‘×.Ñ.¨zÖ:à—‘×&Ñ& tÖ,r+   c               ó    € V ^8„  d   QhRRRR/# )r"   Úpayloadr%   r$   rO   r&   )r'   s   "r(   r)   rP   l   s   € ÷ 	'ñ 	'¨ð 	'°$ñ 	'r+   c                	ó<   € V P                   P                  V4       R # r=   )rK   Úappend)r/   rs   s   &&r(   ÚpongReceivedÚMyWSP.pongReceivedl   s   € Ø�J‰J×Ñ˜gÖ&r+   c               ó   € V ^8„  d   QhRR/# )r"   r$   zDeferred[str]r&   )r'   s   "r(   r)   rP   o   s   € ÷ 	!ñ 	! ñ 	!r+   c                ón   € \        4       V n        V P                  P                  R4       V P                  # )z:
Send a text message to the server and expect a response.
r#   )r
   ro   rN   rn   rW   s   &r(   ÚsendRequestÚMyWSP.sendRequesto   s)   € ô ,4«:ˆDŒMØ�N‰N×*Ñ*¨9Ô5Ø—=‘=Ð r+   c               ó   € V ^8„  d   QhRR/# )r"   r$   zDeferred[bytes]r&   )r'   s   "r(   r)   rP   w   s   € ÷ 	"ñ 	" /ñ 	"r+   c                ón   € \        4       V n        V P                  P                  R4       V P                  # )z;
Send a bytes message to the server and expect a response.
rb   )r
   re   rN   rd   rW   s   &r(   ÚbytesRequestÚMyWSP.bytesRequestw   s)   € ô /7«jˆDŒNØ�N‰N×+Ñ+¨JÔ7Ø—>‘>Ð!r+   )re   ro   rN   rL   )r2   r3   r4   r5   r?   r   ÚlistrK   Ú__annotations__rL   rR   rX   r]   rh   rp   rv   rz   r~   r6   r&   r+   r(   rH   rH   M   sO   ‡ ñ	ñ
 #°4Ô8ˆˆ{Ó8Ø"&ˆ�Ó&õ	'õ	õ	"õ	.õ	-õ	'õ	!÷	"ñ 	"r+   rH   c                  ó.   € ] tR t^t$ R]R&   R R ltRtR# )Ú	MyFactoryzWebSocketFixture[Any]Úfixturec               ó    € V ^8„  d   QhRRRR/# )r"   r#   r   r$   rH   r&   )r'   s   "r(   r)   ÚMyFactory.__annotate__‚   s   € ÷ 	ñ 	¨ð 	°eñ 	r+   c                	ód   € \        4       pV P                  P                  P                  V4       V# r=   )rH   r„   Úserversru   )r/   r#   Únews   && r(   ÚbuildProtocolÚMyFactory.buildProtocol‚   s&   € Ü“'ˆCØ�L‰L× Ñ ×'Ñ'¨Ô,ØˆJr+   r&   N)r2   r3   r4   r5   r�   rŠ   r6   r&   r+   r(   rƒ   rƒ      s   ‡ Ø&Ó&÷	ñ 	r+   rƒ   c                  ó"   € ] tR t^‡tR R ltRtR# )ÚMyClientFactoryc               ó    € V ^8„  d   QhRRRR/# )r"   Úurirk   r$   rH   r&   )r'   s   "r(   r)   ÚMyClientFactory.__annotate__ˆ   s   € ÷ 	ñ 	 Sð 	¨Uñ 	r+   c                	ó   € \        4       # r=   )rH   )r/   r�   s   &&r(   rŠ   ÚMyClientFactory.buildProtocolˆ   s	   € Ü“7ˆNr+   r&   N)r2   r3   r4   r5   rŠ   r6   r&   r+   r(   r�   r�   ‡   s   † ÷	ñ 	r+   r�   Tc                  óä   € ] tR t^Œt$ ]! 4       tR]R&   ]! ]R7      tR]R&   ]! ]	R7      t
R]R&   ^PtR]R	&   ]! ]R7      tR
]R&   ]! ]R7      tR]R&   ]R R l4       tRR R lltRR R lltRtR# )ÚWebSocketFixtureúWebSocketClientFactory[WSP]ÚclientFactoryrI   r   Úreactorr   Úresourcer:   Ú
portNumberz	list[WSP]rˆ   r8   ÚslowResourcec               ó    € V ^8„  d   QhRRRR/# )r"   r–   r•   r$   zWebSocketFixture[WSP]r&   )r'   s   "r(   r)   ÚWebSocketFixture.__annotate__–   s   € ÷ ñ Ð ;ð Ð@Uñ r+   c                	óê  € V ! V4      p\        4       pW#n        VP                  P                  R \	        V4      4       VP                  P                  R\        RR4      4       VP                  P                  R\        4       4       VP                  P                  RVP                  4       VP                  P                  VP                  \        VP                  VP                  R7      4       V# )s   connects   resources	   some-datazapplication/octet-streams
   processings   slow)r—   )rƒ   r„   r˜   ÚputChildrD   r   r    rš   r—   Ú	listenTCPr™   r   )Úclsr–   r/   ÚserverFactorys   &&  r(   r‰   ÚWebSocketFixture.new•   sµ   € á�=Ó!ˆÜ!›ˆØ $ÔØ�‰×Ñ˜zÔ+<¸]Ó+KÔLØ�‰×ÑØœ˜lÐ,FÓGô	
ð 	�‰×Ñ˜}¬m«oÔ>Ø�‰×Ñ˜w¨×(9Ñ(9Ô:Ø�‰×ÑØ�O‰OœT $§-¡-¸¿¹ÔFô	
ð ˆr+   c               ó    € V ^8„  d   QhRRRR/# )r"   r�   rk   r$   r   r&   )r'   s   "r(   r)   rœ   ¥   s   € ÷ 8ñ 8 ð 8Èñ 8r+   c              ƒ  	ó–   "  € \         P                  ! V P                  V4      pVP                  V P                  4      G R j  x€L
 #  L5ir=   )rB   r‰   r—   Úconnectr–   )r/   r�   Úclients   && r(   r¥   ÚWebSocketFixture.connect¥   s6   é € Ü(×,Ò,¨T¯\©\¸3Ó?ˆØ—^‘^ D×$6Ñ$6Ó7×7Ð7Ñ7ùs   ‚A A	ÁAÁA	c               ó    € V ^8„  d   QhRRRR/# )r"   ÚgreetÚboolr$   r   r&   )r'   s   "r(   r)   rœ   ©   s   € ÷ ñ ˜dð ¨fñ r+   c                ój   € \        V P                  4      pVP                  VR7      pVf   Q R4       hV# )a   
There should be a single websocket connection in progress; complete it.

@param greet: Should we immediately issue a greeting, i.e. deliver any
    pending buffered TCP data, upon connection?  If C{False}, the
    caller must call C{flush} on the result to deliver any pending
    data.
©r©   zConnection not in progress.)r   r—   ÚsucceedOnce)r/   r©   Ú	completerÚ	succeededs   &&  r(   ÚcompleteÚWebSocketFixture.complete©   s=   € ô (¨¯©Ó5ˆ	Ø×)Ñ)°Ð)Ó6ˆ	ØÒ$ÐCÐ&CÓCÐ$ØÐr+   r&   N)zhttp://localhost:80/connect)T)r2   r3   r4   r5   r   r–   r�   r   r—   r   r˜   r™   r€   rˆ   r8   rš   Úclassmethodr‰   r¥   r°   r6   r&   r+   r(   r”   r”   Œ   sx   ‡ á16³€MÐ.Ó8Ù"'Ð8JÔ"K€GÐÓKÙ¨xÔ8€HˆhÓ8Ø€J�ÓÙ¨tÔ4€GˆYÓ4Ù$)¸/Ô$J€L�/ÓJàôó ð÷8÷ó r+   r”   z'wsproto library required for websocketsc                  ó‚   € ] tR t^¸tR R ltR R ltR R ltR R ltR	 R
 ltR R lt	R R lt
R R ltR R ltRtR# )ÚWebSocketTestsc               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   ÚWebSocketTests.__annotate__º   s   € ÷ Fñ F ñ Fr+   c                óL  € \         P                  \        4       4      p\        P                  ! VP                  4       4      pV P                  V4       V P                  \        VP                  P                  4      ^4       V P                  \        VP                  P                  4      ^4       VP                  4       pV P                  V4      pVP                  4       pV P                  V4       VP                  4        V P                  V P                  V4      R4       R# )z¯
Connecting to a websocket server (installed with L{WebSocketResource})
from a websocket client (connected with L{WebSocketClientEndpoint})
results in a websocket connection.
rm   N)r”   r‰   r�   r
   ÚfromCoroutiner¥   ÚassertNoResultÚassertEqualÚlenr—   Ú
tcpServersÚ
tcpClientsr°   ÚsuccessResultOfrz   Úflush)r/   r„   Ú	connectedÚpumpÚwsClientÚ	requesteds   &     r(   Útest_websocketÚWebSocketTests.test_websocketº   sØ   € ô #×&Ñ&¤Ó'8Ó9ˆÜ×*Ò*¨7¯?©?Ó+<Ó=ˆ	Ø×Ñ˜IÔ&Ø×Ñœ˜WŸ_™_×7Ñ7Ó8¸!Ô<Ø×Ñœ˜WŸ_™_×7Ñ7Ó8¸!Ô<Ø×ÑÓ!ˆØ×'Ñ'¨	Ó2ˆØ×(Ñ(Ó*ˆ	Ø×Ñ˜IÔ&Ø�
‰
ŒØ×Ñ˜×-Ñ-¨iÓ8¸*ÖEr+   c               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   r¶   Ì   s   € ÷ Tñ T 4ñ Tr+   c                ón  € \         P                  \        4       4      p\        P                  ! VP                  4       4      pVP                  4       pV P                  V4      pVP                  4       pV P                  V4       VP                  4        V P                  V P                  V4      R4       R# )zr
Connecting to a websocket server and sending it a bytes message results
in C{bytesMessageReceived} being called.
rc   N)r”   r‰   r�   r
   r¸   r¥   r°   r¾   r~   r¹   r¿   rº   )r/   r„   rÀ   rÁ   rÂ   Ú
bRequesteds   &     r(   Útest_bytesMessageÚ WebSocketTests.test_bytesMessageÌ   s�   € ô
 #×&Ñ&¤Ó'8Ó9ˆÜ×*Ò*¨7¯?©?Ó+<Ó=ˆ	Ø×ÑÓ!ˆØ×'Ñ'¨	Ó2ˆØ×*Ñ*Ó,ˆ
Ø×Ñ˜JÔ'Ø�
‰
ŒØ×Ñ˜×-Ñ-¨jÓ9Ð;RÖSr+   c               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   r¶   Ú   s   € ÷  4ñ  4 4ñ  4r+   c                ó²  a€ \         P                  \        4       4      p\        P                  ! VP                  4       4       VP                  4       p. o\        \        4       ! V3R lR4      4       pV! 4       pVP                  ^ ,          P                  P                  V4       V P                  S. 4       VP                  P                  P                  4        V P                  SR.4       VP                  P                  P!                  4        V P                  SRR.4       VP                  P                  P#                  4        V P                  S. RO4       V P%                  VP                  P                  V4       VP                  ^ ,          P                  P'                  4        V P%                  VP                  P                  R4       R# )zW
Websocket transports can notify a producer of backpressure events via
attachProducer.
c                  óN   <€ ] tR t^ätR V 3R lltR V 3R lltR V 3R lltRtR# )	Ú6WebSocketTests.test_backpressure.<locals>.TestProducerc               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   ÚCWebSocketTests.test_backpressure.<locals>.TestProducer.__annotate__æ   s   € ÷ (ñ (¨ñ (r+   c                	ó*   <€ SP                  R 4       R# )ÚpausedN©ru   ©r/   Úeventss   &€r(   ÚpauseProducingÚEWebSocketTests.test_backpressure.<locals>.TestProducer.pauseProducingæ   s   ø€ Ø—‘˜hÖ'r+   c               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   rÐ   é   s   € ÷ )ñ )¨ñ )r+   c                	ó*   <€ SP                  R 4       R# )ÚresumedNrÓ   rÔ   s   &€r(   ÚresumeProducingÚFWebSocketTests.test_backpressure.<locals>.TestProducer.resumeProducingé   ó   ø€ Ø—‘˜iÖ(r+   c               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   rÐ   ì   s   € ÷ )ñ ) tñ )r+   c                	ó*   <€ SP                  R 4       R# )ÚstoppedNrÓ   rÔ   s   &€r(   ÚstopProducingÚDWebSocketTests.test_backpressure.<locals>.TestProducer.stopProducingì   rÝ   r+   r&   N)r2   r3   r4   r5   rÖ   rÛ   rá   r6   )rÕ   s   €r(   ÚTestProducerrÎ   ä   s!   ø† ÷(ð (÷)ð )÷)ô )r+   rã   rÒ   rÚ   N)rÒ   rÚ   rà   )r”   r‰   r�   r
   r¸   r¥   r°   r	   r   rˆ   rN   ÚattachProducerrº   ÚserverIOÚproducerrÖ   rÛ   rá   ÚassertIsÚdetachProducer)r/   r„   rÁ   rã   ÚtestProducerrÕ   s   &    @r(   Útest_backpressureÚ WebSocketTests.test_backpressureÚ   sW  ø€ ô
 #×&Ñ&¤Ó'8Ó9ˆÜ×Ò˜wŸ™Ó0Ô1Ø×ÑÓ!ˆØˆä	”]Ó	#÷	)ó 	)ó 
$ð	)ñ $“~ˆØ�‰˜Õ×$Ñ$×3Ñ3°LÔAØ×Ñ˜ Ô$Ø�‰×Ñ×-Ñ-Ô/Ø×Ñ˜ ( Ô,Ø�‰×Ñ×.Ñ.Ô0Ø×Ñ˜ (¨IÐ!6Ô7Ø�‰×Ñ×,Ñ,Ô.Ø×Ñ˜Ò!AÔBØ�‰�d—m‘m×,Ñ,¨lÔ;Ø�‰˜Õ×$Ñ$×3Ñ3Ô5Ø�‰�d—m‘m×,Ñ,¨dÖ3r+   c               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   r¶   ü   s   € ÷ 3ñ 3˜tñ 3r+   c                ó’  € \         P                  \        4       4      p\        P                  ! VP                  4       4      pVP                  4       pV P                  V4      pVP                  P                  R4       V P                  VP                  . 4       VP                  4        V P                  VP                  R.4       R# )a  
Internally, Twisted's websocket resource responds to all ping requests
with a pong as required by the spec, so peers can issue a C{ping} and
receive a C{pong} message with the same payload; our websocket
transport also implements a C{ping} method to send that message.
s   123N)r”   r‰   r�   r
   r¸   r¥   r°   r¾   rN   Úpingrº   rK   r¿   ©r/   r„   rÀ   rÁ   rÂ   s   &    r(   Útest_pingPongÚWebSocketTests.test_pingPongü   s“   € ô #×&Ñ&¤Ó'8Ó9ˆÜ×*Ò*¨7¯?©?Ó+<Ó=ˆ	Ø×ÑÓ!ˆØ×'Ñ'¨	Ó2ˆØ×Ñ×Ñ Ô'Ø×Ñ˜Ÿ™¨Ô,Ø�
‰
ŒØ×Ñ˜Ÿ™¨&¨Ö2r+   c               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   r¶     s   € ÷ 1ñ 1¨4ñ 1r+   c                óÔ  € \         P                  \        4       4      p\        P                  ! VP                  4       4      pVP                  4       pV P                  V4      pV P                  VP                  ^ ,          P                  R4       V P                  VP                  R4       VP                  P                  4        V P                  VP                  ^ ,          P                  R4       V P                  VP                  R4       VP                  4        V P                  VP                  ^ ,          P                  R4       V P                  VP                  R4       R# )z]
When the underlying TCP connection is lost,
L{WebSocketProtocol.connectionLost} is invoked.
N)r”   r‰   r�   r
   r¸   r¥   r°   r¾   rç   rˆ   rL   rN   ÚloseConnectionr¿   ÚassertIsNotrï   s   &    r(   Útest_serverConnectionLostÚ(WebSocketTests.test_serverConnectionLost  sþ   € ô
 #×&Ñ&¤Ó'8Ó9ˆÜ×*Ò*¨7¯?©?Ó+<Ó=ˆ	Ø×ÑÓ!ˆØ×'Ñ'¨	Ó2ˆØ�‰�g—o‘o aÕ(×0Ñ0°$Ô7Ø�‰�h×&Ñ&¨Ô-Ø×Ñ×)Ñ)Ô+Ø�‰�g—o‘o aÕ(×0Ñ0°$Ô7Ø�‰�h×&Ñ&¨Ô-Ø�
‰
ŒØ×Ñ˜Ÿ™¨Õ+×3Ñ3°TÔ:Ø×Ñ˜×)Ñ)¨4Ö0r+   c               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   r¶     s   € ÷ 
ñ 
˜$ñ 
r+   c                óŠ  € \         P                  \        4       4      p\        VP                  4      pVP                  RR4      pV P                  V4       VP                  4        V P                  V4      pV P                  VP                  \        4       \        V4      pV P                  V P                  V4      R4       R# )z‹
Attempting to issue an C{HTTP GET} against a websocket server
(installed with L{WebSocketResource}) results in a C{BAD_REQUEST}
response.
s   GETs   http://localhost/connects$   websocket protocol negotiation errorN)r”   r‰   r�   r   r—   r#   r¹   r°   r¾   rº   Úcoder   r   )r/   r„   Úagentrm   ÚrÚbodys   &     r(   Útest_badÚWebSocketTests.test_bad  sœ   € ô #×&Ñ&¤Ó'8Ó9ˆÜ�g—o‘oÓ&ˆØ—=‘= Ð)DÓEˆØ×Ñ˜HÔ%Ø×ÑÔØ× Ñ  Ó*ˆØ×Ñ˜Ÿ™¤Ô-Ü˜‹{ˆØ×ÑØ× Ñ  Ó&Ð(Oö	
r+   c               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   r¶   0  s   € ÷ <ñ <¨ñ <r+   c                ó  € \         P                  \        4       4      p\        P                  ! VP                  R4      4      pVP                  RR7      pV P                  V4       VP                  4        V P                  V\        4       R# )ú¡
Attempting to connect to a regular HTTP resource that does not support
websockets will result in the Deferred returned from
L{WebSocketClientEndpoint} failing.
zhttp://localhost/emptyFr¬   N©r”   r‰   r�   r
   r¸   r¥   r°   r¹   r¿   ÚfailureResultOfrA   ©r/   r„   rÀ   rÁ   s   &   r(   Útest_connectionRefusedÚ%WebSocketTests.test_connectionRefused0  sl   € ô #×&Ñ&¤Ó'8Ó9ˆÜ×*Ò*¨7¯?©?Ð;SÓ+TÓUˆ	Ø×Ñ eÐÓ,ˆØ×Ñ˜IÔ&Ø�
‰
ŒØ×Ñ˜YÔ(:Ö;r+   c               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   r¶   =  s   € ÷ <ñ <¨Tñ <r+   c                ó  € \         P                  \        4       4      p\        P                  ! VP                  R4      4      pVP                  RR7      pV P                  V4       VP                  4        V P                  V\        4       R# )r  zhttp://localhost/processingFr¬   Nr  r  s   &   r(   Útest_connectionRefusedWeirdÚ*WebSocketTests.test_connectionRefusedWeird=  sq   € ô #×&Ñ&¤Ó'8Ó9ˆÜ×*Ò*Ø�O‰OÐ9Ó:ó
ˆ	ð ×Ñ eÐÓ,ˆØ×Ñ˜IÔ&Ø�
‰
ŒØ×Ñ˜YÔ(:Ö;r+   c               ó   € V ^8„  d   QhRR/# rU   r&   )r'   s   "r(   r)   r¶   L  s   € ÷ >ñ >¨Dñ >r+   c                ó  € \         P                  \        4       4      p\        P                  ! VP                  R4      4      pVP                  RR7      pV P                  V4       VP                  P                  P                  R4       VP                  4        V P                  V\        4      pVP                  P                  pVP!                  \#        4       ;p4       V P%                  VP&                  R4       VP                  P                  pVP                  R4       VP                  4        V P%                  VP&                  R4       VP                  R4       VP                  4        V P%                  VP&                  R4       VP)                  4        V P+                  VP,                  R4       VP                  4        VP,                  f   Q R	4       hV P%                  VP,                  P.                  \0        4       R# )
z�
When the client connection is refused by an asynchronous HTTP response,
the websocket client will not be notified until the response arrives.
zhttp://localhost/slowTr¬   r+   s   hellos   worlds
   helloworldNzshould be closed now)r”   r‰   r�   r
   r¸   r¥   r°   r¹   rš   r#   Úwriter¿   r  rA   Úvaluerm   ÚdeliverBodyr   rº   r`   Úfinishrç   ÚclosedReasonÚtyper   )r/   r„   rÀ   rÁ   ÚrejectedÚrespÚpÚreqs   &       r(   Útest_connectionRefusedSlowÚ)WebSocketTests.test_connectionRefusedSlowL  sy  € ô
 #×&Ñ&¤Ó'8Ó9ˆÜ×*Ò*¨7¯?©?Ð;RÓ+SÓTˆ	Ø×Ñ dÐÓ+ˆØ×Ñ˜IÔ&Ø×Ñ×$Ñ$×*Ñ*¨3Ô/Ø�
‰
Œà×'Ñ'¨	Ô3EÓFˆØ�~‰~×&Ñ&ˆØ×ÑÔ2Ó4Ð4˜Ô5Ø×Ñ˜Ÿ™ Ô%Ø×"Ñ"×*Ñ*ˆØ�	‰	�(ÔØ�
‰
ŒØ×Ñ˜Ÿ™ Ô*Ø�	‰	�(ÔØ�
‰
ŒØ×Ñ˜Ÿ™ Ô/Ø�
‰
ŒØ�‰�a—n‘n dÔ+Ø�
‰
Œà�~‰~Ò)ÐAÐ+AÓAÐ)Ø×Ñ˜Ÿ™×,Ñ,¬nÖ=r+   r&   N)r2   r3   r4   r5   rÄ   rÉ   rê   rð   rö   rþ   r  r
  r  r6   r&   r+   r(   r´   r´   ¸   s7   † õFõ$Tõ 4õD3õ 1õ$
õ$<õ<÷>ñ >r+   r´   N)@r?   Ú
__future__r   Údataclassesr   r   Útypingr   r   r   Úunittestr   Úzope.interfacer	   Útwisted.internet.deferr
   Útwisted.internet.errorr   Útwisted.internet.interfacesr   Útwisted.internet.testingr   r   Útwisted.python.failurer   Útwisted.test.iosimr   r   Útwisted.trial.unittestr   Útwisted.web._responsesr   Útwisted.web.clientr   r   Útwisted.web.iwebr   Útwisted.web.resourcer   Útwisted.web.serverr   r   r   Útwisted.web.staticr   r   Ú
shouldSkipr    r8   Ú
__import__Útwisted.web.websocketrA   rB   rC   r   rD   rE   rF   rH   rƒ   r�   ÚImportErrorr”   r´   r&   r+   r(   Ú<module>r0     s.  ðñõ #ç (ß (Ñ (Ý å &å +Ý 1Ý 5ß MÝ *ß :Ý 6Ý .ß .Ý %Ý )ß :Ñ :Ý #áˆeÐ.Ô/€Ø€
ô�Hô ô 	�hô 	ðKÙˆyÔ÷÷ ñ ð ô/"Ð!ó /"ó ð/"ôbÐ*¨5Õ1ô ôÐ0°Õ7ô ð
 ô(�w˜s•|ó (ó ð(ñV ˆ
Ð=Ó>ôo>Ð(ó o>ó ?òo>øðs ô Ø‚Jðús   Â"D  Ä 	D,Ä+D,