mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-11 07:30:55 +00:00
Temporary porcelain until next PR
This commit is contained in:
@ -32,6 +32,16 @@ def encode_msg_with_length(msg_bytes: bytes) -> bytes:
|
|||||||
return len_prefix + msg_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):
|
class MsgIOWriter(Writer, Closer):
|
||||||
write_closer: WriteCloser
|
write_closer: WriteCloser
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user