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 greenlet if no data exists until self.eof has been set.

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

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

read()

Read available data, or return None

Return type

bytes

write(data)

Write data to buffer.

Parameters

data (bytes) – Data to write

eof