o
    ¯bA  ã                   @   s~   d Z ddlZddlmZmZ ddlmZ G dd„ dejƒZe	dkr=e 
ejd ¡ ¡  dd	lmZ e eƒ ¡ e ¡  dS dS )
zÈ
Main program for the child process run by
L{twisted.test.test_stdio.StandardInputOutputTests.test_hostAndPeer} to test
that ITransport.getHost() and ITransport.getPeer() work for process transports.
é    N)ÚprotocolÚstdio)Úreflectc                   @   s   e Zd Zdd„ Zdd„ ZdS )ÚHostPeerChildc                 C   sD   | j  d t| j  ¡ ƒ d¡t| j  ¡ ƒ d¡g¡¡ | j  ¡  d S )Nó   
Úascii)Ú	transportÚwriteÚjoinÚstrÚgetHostÚencodeÚgetPeerÚloseConnection)Úself© r   úB/usr/lib/python3/dist-packages/twisted/test/stdio_test_hostpeer.pyÚconnectionMade   s   þÿÿzHostPeerChild.connectionMadec                 C   s   t  ¡  d S )N)ÚreactorÚstop)r   Úreasonr   r   r   ÚconnectionLost   s   zHostPeerChild.connectionLostN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r      s    r   Ú__main__é   )r   )Ú__doc__ÚsysÚtwisted.internetr   r   Útwisted.pythonr   ÚProtocolr   r   ÚnamedAnyÚargvÚinstallr   Ú
StandardIOÚrunr   r   r   r   Ú<module>   s   û