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:
mhchia
2019-08-20 18:09:36 +08:00
parent 0b466ddc86
commit ef476e555b
9 changed files with 22 additions and 31 deletions

View File

@ -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()