Temporary porcelain until next PR

This commit is contained in:
Alex Stokes 2019-09-03 21:59:09 -07:00
parent 8e8318aa5c
commit 2a02f92f77
No known key found for this signature in database
GPG Key ID: 51CE1721B245C086

View File

@ -32,6 +32,16 @@ def encode_msg_with_length(msg_bytes: bytes) -> bytes:
return len_prefix + msg_bytes
# NOTE: temporary for this PR
encode = encode_msg_with_length
# NOTE: temporary for this PR
async def read_next_message(reader: Reader) -> bytes:
length = await read_length(reader)
return await reader.read(length)
class MsgIOWriter(Writer, Closer):
write_closer: WriteCloser