What feature should we add?
While messages from a stream might normally need delineation, the length prefix of RLP makes delimiters redundant. Also, no delimiter can be valid for RLP. I am requesting a way to read complete rlp-encoded messages from a stream (eg sys.stdin).
Essentially it should work similar to asyncio.StreamReader.readline() but read an entire RLP message rather than a utf-8 line.
Usage
reader = rlp.StreamReader()
pipe_protocol = asyncio.StreamReaderProtocol(reader)
loop = asyncio.get_event_loop()
await loop.connect_read_pipe(
lambda: pipe_protocol, sys.stdin
)
message = await reader.read()
What feature should we add?
While messages from a stream might normally need delineation, the length prefix of RLP makes delimiters redundant. Also, no delimiter can be valid for RLP. I am requesting a way to read complete rlp-encoded messages from a stream (eg
sys.stdin).Essentially it should work similar to
asyncio.StreamReader.readline()but read an entire RLP message rather than a utf-8 line.Usage