mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Use RawConnection.read
Instead of accessing its reader and writer directly. TODO: considering add `ReaderWriterCloser` interface and let connection and stream inherit from it.
This commit is contained in:
@ -23,7 +23,7 @@ class InsecureSession(BaseSession):
|
||||
encoded_msg_bytes = encode_fixedint_prefixed(msg_bytes)
|
||||
await self.write(encoded_msg_bytes)
|
||||
|
||||
msg_bytes_other_side = await read_fixedint_prefixed(self.reader)
|
||||
msg_bytes_other_side = await read_fixedint_prefixed(self.conn)
|
||||
msg_other_side = plaintext_pb2.Exchange()
|
||||
msg_other_side.ParseFromString(msg_bytes_other_side)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user