Use ReadWriteCloser for conns and streams

This commit is contained in:
mhchia
2019-09-05 23:24:17 +08:00
parent eac159c527
commit 10415cb956
9 changed files with 24 additions and 88 deletions

View File

@ -44,13 +44,12 @@ class NetStream(INetStream):
"""
return await self.muxed_stream.write(data)
async def close(self) -> bool:
async def close(self) -> None:
"""
close stream
:return: true if successful
"""
await self.muxed_stream.close()
return True
async def reset(self) -> bool:
return await self.muxed_stream.reset()