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