mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Expose reset method on NetStream
This commit is contained in:
@ -50,3 +50,6 @@ class NetStream(INetStream):
|
|||||||
"""
|
"""
|
||||||
await self.muxed_stream.close()
|
await self.muxed_stream.close()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
async def reset(self) -> bool:
|
||||||
|
return await self.muxed_stream.reset()
|
||||||
|
|||||||
@ -42,3 +42,9 @@ class INetStream(ABC):
|
|||||||
close the underlying muxed stream
|
close the underlying muxed stream
|
||||||
:return: true if successful
|
:return: true if successful
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
async def reset(self) -> bool:
|
||||||
|
"""
|
||||||
|
Close both ends of the stream.
|
||||||
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user