??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
=OXc @ sp d Z d d l Z d d l Z d d l Z d d l m Z m Z d e f d „ ƒ YZ d e f d „ ƒ YZ
d S( sÙ
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.
iÿÿÿÿN( t PY2t bt PipeTimeoutc B s e Z d Z RS( sP
Indicates that a timeout was reached on a read from a `.BufferedPipe`.
( t __name__t
__module__t __doc__( ( ( s: /usr/lib/python2.7/site-packages/paramiko/buffered_pipe.pyR s t BufferedPipec B sŒ e Z d Z d „ Z e r3 d „ Z d
d „ Z n d „ Z d
d „ Z d „ Z d „ Z d „ Z
d
d „ Z d
„ Z d „ Z
d „ Z RS( sª
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 C sL t j ƒ | _ t j | j ƒ | _ d | _ t j d ƒ | _ t | _
d S( Nt B( t threadingt Lockt _lockt Conditiont _cvt Nonet _eventt arrayt _buffert Falset _closed( t self( ( s: /usr/lib/python2.7/site-packages/paramiko/buffered_pipe.pyt __init__- s
c C s | j j | ƒ d S( N( R t
fromstring( R t data( ( s: /usr/lib/python2.7/site-packages/paramiko/buffered_pipe.pyt _buffer_frombytes5 s c C s | j | j ƒ S( N( R t tostring( R t limit( ( s: /usr/lib/python2.7/site-packages/paramiko/buffered_pipe.pyt _buffer_tobytes8 s c C s | j j | ƒ d S( N( R t frombytes( R R ( ( s: /usr/lib/python2.7/site-packages/paramiko/buffered_pipe.pyR ; s c C s | j | j ƒ S( N( R t tobytes( R R ( ( s: /usr/lib/python2.7/site-packages/paramiko/buffered_pipe.pyR > s c C sd | j j ƒ zB | | _ | j s7 t | j ƒ d k rD | j ƒ n
| j ƒ Wd | j j ƒ Xd S( s
Set an event on this buffer. When data is ready to be read (or the
buffer has been closed), the event will be set. When no data is
ready, the event will be cleared.
:param threading.Event event: the event to set/clear
i N( R
t acquireR R t lenR t sett cleart release( R t event( ( s: /usr/lib/python2.7/site-packages/paramiko/buffered_pipe.pyt set_eventA s
c C se | j j ƒ zC | j d k r/ | j j ƒ n | j t | ƒ ƒ | j j ƒ Wd | j j ƒ Xd S( sÕ
Feed new data into this pipe. This method is assumed to be called
from a separate thread, so synchronization is done.
:param data: the data to add, as a `str` or `bytes`
N(
R
R R R
R R R R t notifyAllR! ( R R ( ( s: /usr/lib/python2.7/site-packages/paramiko/buffered_pipe.pyt feedX s
c C sC | j j ƒ z! t | j ƒ d k r) t St SWd | j j ƒ Xd S( sl
Returns true if data is buffered and ready to be read from this
feeder. A ``False`` result does not mean that the feeder has closed;
it means you may need to wait before more data arrives.
:return:
``True`` if a `read` call would immediately return at least one
byte; ``False`` otherwise.
i N( R
R R R R t TrueR! ( R ( ( s: /usr/lib/python2.7/site-packages/paramiko/buffered_pipe.pyt
read_readyh s
c C sV t ƒ } | j j ƒ z+t | j ƒ d k rÓ | j r; | S| d k rS t ƒ ‚ n x} t | j ƒ d k rÏ | j rÏ t j ƒ } | j j | ƒ | d k rV | t j ƒ | 8} | d k rÌ t ƒ ‚ qÌ qV qV Wn t | j ƒ | k r'| j ƒ } | j 2| j d k r@| j r@| j j
ƒ q@n | j | ƒ } | j | 4Wd | j j ƒ X| S( sq
Read data from the pipe. The return value is a string representing
the data received. The maximum amount of data to be received at once
is specified by ``nbytes``. If a string of length zero is returned,
the pipe has been closed.
The optional ``timeout`` argument can be a nonnegative float expressing
seconds, or ``None`` for no timeout. If a float is given, a
`.PipeTimeout` will be raised if the timeout period value has elapsed
before any data arrives.
:param int nbytes: maximum number of bytes to read
:param float timeout:
maximum seconds to wait (or ``None``, the default, to wait forever)
:return: the read data, as a `bytes`
:raises PipeTimeout:
if a timeout was specified and no data was ready before that
timeout
i g N( t bytesR
R R R R R t timeR t waitR
R R R R! ( R t nbytest timeoutt outt then( ( s: /usr/lib/python2.7/site-packages/paramiko/buffered_pipe.pyt readz s0
"c C sf | j j ƒ zD | j ƒ } | j 2| j d k rL | j rL | j j ƒ n | SWd | j j ƒ Xd S( sÁ
Clear out the buffer and return all data that was in it.
:return:
any data that was in the buffer prior to clearing it out, as a
`str`
N( R
R R R R R
R R R! ( R R- ( ( s: /usr/lib/python2.7/site-packages/paramiko/buffered_pipe.pyt empty° s
c C s[ | j j ƒ z9 t | _ | j j ƒ | j d k rE | j j ƒ n Wd | j j ƒ Xd S( s™
Close this pipe object. Future calls to `read` after the buffer
has been emptied will return immediately with an empty string.
N(
R
R R&