nvflare.fuel.f3.streaming.byte_receiver module¶
- class ByteReceiver(cell: CoreCell)[source]¶
Bases:
object- received_stream_counter_pool = <nvflare.fuel.f3.stats_pool.CounterPool object>¶
- received_stream_size_pool = <nvflare.fuel.f3.stats_pool.HistPool object>¶
- class RxStream(task: RxTask)[source]¶
Bases:
StreamA stream that’s used to read streams from the streaming task
Constructor for stream
- Parameters:
size – The total size of stream. 0 if unknown
headers – Optional headers to be passed to the receiver
- read(size: int) bytes[source]¶
Read and return up to size bytes. It can return less but not more than the size. An empty bytes object is returned if the stream reaches the end.
- Parameters:
size – Up to (but maybe less) this many bytes will be returned
- Returns:
Binary data. If empty, it means the stream is depleted (EOS)