mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Modify NetStream to read n bytes
This commit is contained in:
committed by
Kevin Mai-Husan Chia
parent
dbdbcf7440
commit
2485a00e24
@ -22,9 +22,10 @@ class INetStream(ABC):
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
async def read(self) -> bytes:
|
||||
async def read(self, n: int = -1) -> bytes:
|
||||
"""
|
||||
reads from the underlying muxed_stream
|
||||
:param n: number of bytes to read
|
||||
:return: bytes of input
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user