ó
    ×›‘hý  ã                   óÔ  • S r SSKrSSKJr  SSKJrJr  SSKJr  SSK	J
r
Jr  \" \5       " S S\R                  5      5       r\S	:X  a   \R                  " \R                   S
   5      R#                  5         \
R$                  " \" \R                   S   S5      5        SSKJr  \" 5       r\R,                  " \5        \R.                  " 5         \R0                  " \R2                  5        gg)zÊ
Main program for the child process run by
L{twisted.test.test_stdio.StandardInputOutputTests.test_readConnectionLost} to
test that IHalfCloseableProtocol.readConnectionLost works for stdio transports.
é    N)Úimplementer)ÚprotocolÚstdio)ÚIHalfCloseableProtocol)ÚlogÚreflectc                   ó4   • \ rS rSrSrSrS rS rS rS r	Sr
g)	ÚHalfCloseProtocolé   z¾
A protocol to hook up to stdio and observe its transport being
half-closed.  If all goes as expected, C{exitCode} will be set to C{0};
otherwise it will be set to C{1} to indicate failure.
Nc                 ó:   • U R                   R                  S5        g)z-
Signal the parent process that we're ready.
ó   xN)Ú	transportÚwrite©Úselfs    ÚeC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/test/stdio_test_halfclose.pyÚconnectionMadeÚ HalfCloseProtocol.connectionMade   s   € ð 	�‰×Ñ˜TÕ"ó    c                 ó<   • SU l         [        R                  " 5         g)z^
This is the desired event.  Once it has happened, stop the reactor so
the process will exit.
r   N)ÚexitCodeÚreactorÚstopr   s    r   ÚreadConnectionLostÚ$HalfCloseProtocol.readConnectionLost%   s   € ð
 ˆŒÜ�Š�r   c                 ó„   • U R                   c  SU l         [        R                  " US5        [        R                  " 5         g)zt
This may only be invoked after C{readConnectionLost}.  If it happens
otherwise, mark it as an error and shut down.
Né   z!Unexpected call to connectionLost)r   r   Úerrr   r   )r   Úreasons     r   ÚconnectionLostÚ HalfCloseProtocol.connectionLost-   s-   € ð
 �=‰=Ñ ØˆDŒMÜ�GŠG�FÐ?Ô@Ü�Š�r   c                 ó   • g )N© r   s    r   ÚwriteConnectionLostÚ%HalfCloseProtocol.writeConnectionLost7   s   € àr   )r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r   r    r$   Ú__static_attributes__r#   r   r   r
   r
      s"   † ñð €Hò#òòõr   r
   Ú__main__r   é   Úwb)r   )r*   ÚsysÚzope.interfacer   Útwisted.internetr   r   Útwisted.internet.interfacesr   Útwisted.pythonr   r   ÚProtocolr
   r&   ÚnamedAnyÚargvÚinstallÚstartLoggingÚopenr   ÚhalfCloseProtocolÚ
StandardIOÚrunÚexitr   r#   r   r   Ú<module>r>      sÅ   ðñ
ó å &ç ,Ý >ß 'ñ Ð#Ó$ô#˜×)Ñ)ó #ó %ð#ðL ˆzÓØ×Ò�S—X‘X˜a‘[Ó!×)Ñ)Ô+Ø×Ò‘T˜#Ÿ(™( 1™+ tÓ,Ô-Ý(á)Ó+ÐØ	×ÒÐ&Ô'Ø‡K‚K„MØ‡H‚HÐ×'Ñ'Õ(ð r   