§
    Ètºf)  ã                   óâ  — U d Z ddlZddlmZ ddlmZmZ ddlmZm	Z	m
Z
 ddlmZmZ  ee¦  «         G d„ dej        ¦  «        ¦   «         Zed	k    r� ej        ej        d
         ¦  «                             ¦   «           ej         eej        d         d¦  «        ¦  «         e	ed<   ddlmZ  e¦   «         Z ej        e¦  «          ej        ¦   «           ej        ej        ¦  «         dS dS )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ÚIReactorCoreÚ
ITransport)ÚlogÚreflectc                   óL   — e Zd ZU dZdZeed<   d
d„Zd
d„Zdde	ddfd„Z
d
d	„ZdS )ÚHalfCloseProtocolzÎ
    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.
    NÚ	transportÚreturnc                 ó:   — | j                              d¦  «         dS )z=
        Signal the parent process that we're ready.
        ó   xN)r   Úwrite©Úselfs    úf/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/test/stdio_test_halfclose_buggy.pyÚconnectionMadez HalfCloseProtocol.connectionMade    s    € ð 	Œ×Ò˜TÑ"Ô"Ð"Ð"Ð"ó    c                 ó    — t          d¦  «        ‚)zv
        This is the desired event.  Once it has happened, stop the reactor so
        the process will exit.
        zsomething went wrong)Ú
ValueErrorr   s    r   ÚreadConnectionLostz$HalfCloseProtocol.readConnectionLost&   s   € õ
 Ð/Ñ0Ô0Ð0r   Úreasonc                 ó:   — d| _         t          j        ¦   «          dS )zŒ
        This may only be invoked after C{readConnectionLost}.  If it happens
        otherwise, mark it as an error and shut down.
        r   N)ÚexitCodeÚreactorÚstop)r   r   s     r   ÚconnectionLostz HalfCloseProtocol.connectionLost-   s   € ð
 ˆŒÝŒ‰Œˆˆˆr   c                 ó   — d S ©N© r   s    r   ÚwriteConnectionLostz%HalfCloseProtocol.writeConnectionLost5   s   € àˆr   )r   Nr!   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__annotations__r   r   Úobjectr   r#   r"   r   r   r   r      s–   € € € € € € ðð ð €HØÐÐÑð#ð #ð #ð #ð1ð 1ð 1ð 1ðð  Vð °tð ð ð ð ðð ð ð ð ð r   r   Ú__main__é   é   Úwr   )r   )r'   ÚsysÚzope.interfacer   Útwisted.internetr   r   Útwisted.internet.interfacesr   r   r   Útwisted.pythonr	   r
   ÚProtocolr   r$   ÚnamedAnyÚargvÚinstallÚstartLoggingÚopenr(   r   ÚhalfCloseProtocolÚ
StandardIOÚrunÚexitr   r"   r   r   ú<module>r=      sŽ  ðð
ð ð ð €
€
€
à &Ð &Ð &Ð &Ð &Ð &à ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø XÐ XÐ XÐ XÐ XÐ XÐ XÐ XÐ XÐ XØ 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'ð €Ð#Ñ$Ô$ð!ð !ð !ð !ð !˜Ô)ñ !ô !ñ %Ô$ð!ðH ˆzÒÐØ€GÔ�S”X˜a”[Ñ!Ô!×)Ò)Ñ+Ô+Ð+Ø€CÔ�T�T˜#œ( 1œ+ sÑ+Ô+Ñ,Ô,Ð,ØÐÐÑØ(Ð(Ð(Ð(Ð(Ð(à)Ð)Ñ+Ô+ÐØ€EÔÐ&Ñ'Ô'Ð'Ø€G„K�M„M€MØ€C„HÐÔ'Ñ(Ô(Ð(Ð(Ð(ð Ðr   