%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/paramiko/__pycache__/ |
| Current File : //lib/python3/dist-packages/paramiko/__pycache__/buffered_pipe.cpython-312.pyc |
�
�ec, � �\ � d Z ddlZddlZddlZddlmZmZ G d� de� Z G d� de � Z
y)z�
Attempt to generalize the "feeder" part of a `.Channel`: an object which can be
read from and closed, but is reading from a buffer fed by another thread. The
read operations are blocking and can have a timeout set.
� N)�PY2�bc � � e Zd ZdZy)�PipeTimeoutzP
Indicates that a timeout was reached on a read from a `.BufferedPipe`.
N)�__name__�
__module__�__qualname__�__doc__� � �8/usr/lib/python3/dist-packages/paramiko/buffered_pipe.pyr r s � �� r r c �d � e Zd ZdZd� Zerd� Zdd�Znd� Zdd�Zd� Zd � Z d
� Z
dd�Zd� Zd
� Z
d� Zy)�BufferedPipez�
A buffer that obeys normal read (with timeout) & close semantics for a
file or socket, but is fed data from another thread. This is used by
`.Channel`.
c �� � t j � | _ t j | j � | _ d | _ t
j d� | _ d| _ y )N�BF) � threading�Lock�_lock� Condition�_cv�_event�array�_buffer�_closed��selfs r
�__init__zBufferedPipe.__init__. sD � ��^�^�%��
��&�&�t�z�z�2�������{�{�3�'�����r c �: � | j j |� y �N)r �
fromstring�r �datas r
�_buffer_frombyteszBufferedPipe._buffer_frombytes7 s � ��L�L�#�#�D�)r Nc �<