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:
@ -16,7 +16,7 @@ class RawConnectionCommunicator(IMultiselectCommunicator):
|
||||
await self.conn.write(msg_bytes)
|
||||
|
||||
async def read(self) -> str:
|
||||
data = await read_delim(self.conn.reader)
|
||||
data = await read_delim(self.conn)
|
||||
return data.decode()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user