Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/paramiko/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/paramiko/__pycache__/pipe.cpython-38.pyc
U

P��g>�@sZdZddlZddlZddlZdd�ZGdd�d�ZGdd�d�ZGd	d
�d
�Zdd�ZdS)
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>`.
�NcCs$tjdd�dkrt�}nt�}|S)N��win)�sys�platform�	PosixPipe�WindowsPipe)�p�r	�:/opt/cppython/lib/python3.8/site-packages/paramiko/pipe.py�	make_pipe!src@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)rcCs&t��\|_|_d|_d|_d|_dS�NF)�os�pipe�_rfd�_wfd�_set�_forever�_closed��selfr	r	r
�__init__*szPosixPipe.__init__cCs"t�|j�t�|j�d|_dS�NT)r
�closerrrrr	r	r
r0szPosixPipe.closecCs|jS�N)rrr	r	r
�fileno6szPosixPipe.filenocCs(|jr|jrdSt�|jd�d|_dS�N�F)rrr
�readrrr	r	r
�clear9szPosixPipe.clearcCs(|js|jrdSd|_t�|jd�dS�NT�*)rrr
�writerrr	r	r
�set?sz
PosixPipe.setcCsd|_|��dSr�rr"rr	r	r
�set_foreverEszPosixPipe.set_foreverN)	�__name__�
__module__�__qualname__rrrrr"r$r	r	r	r
r)src@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)rz�
    On Windows, only an OS-level "WinSock" may be used in select(), but reads
    and writes must be to the actual socket object.
    cCszt�tjtj�}|�d�|�d�t�tjtj�|_|j�d|��df�|��\|_	}|�
�d|_d|_d|_
dS)N)�	127.0.0.1rrr(F)�socket�AF_INET�SOCK_STREAM�bind�listen�_rsock�connect�getsockname�accept�_wsockrrrr)rZserv�addrr	r	r
rPs

zWindowsPipe.__init__cCs|j��|j��d|_dSr)r.rr2rrr	r	r
r_s

zWindowsPipe.closecCs
|j��Sr)r.rrr	r	r
reszWindowsPipe.filenocCs&|jr|jrdS|j�d�d|_dSr)rrr.�recvrr	r	r
rhszWindowsPipe.clearcCs&|js|jrdSd|_|j�d�dSr)rrr2�sendrr	r	r
r"nszWindowsPipe.setcCsd|_|��dSrr#rr	r	r
r$tszWindowsPipe.set_foreverN)
r%r&r'�__doc__rrrrr"r$r	r	r	r
rJsrc@s$eZdZdd�Zdd�Zdd�ZdS)�OrPipecCsd|_d|_||_dSr)r�_partner�_pipe)rrr	r	r
rzszOrPipe.__init__cCsd|_|jjs|j��dSr)rr8r9r"rr	r	r
r"sz
OrPipe.setcCsd|_|jjs|j��dSr)rr8r9rrr	r	r
r�szOrPipe.clearN)r%r&r'rr"rr	r	r	r
r7ysr7cCs$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.
    )r7r8)r�p1Zp2r	r	r
�make_or_pipe�s
r;)	r6rr
r)rrrr7r;r	r	r	r
�<module>s	!/

F1le Man4ger