Output reader/writer

class pssh.clients.reader.ConcurrentRWBuffer

Concurrent reader/writer of bytes for use from multiple greenlets.

Supports both concurrent reading and writing.

Iterate on buffer object to read data, yielding event loop if no data exists until self.eof has been set.

Writers should call ConcurrentRWBuffer.eof.set() when finished writing data via write.

Readers can use read() to get any available data or None.


Read available data, or return None.

Return type:bytes

Write data to buffer.

Parameters:data (bytes) – Data to write