mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-11 07:30:55 +00:00
adding additional bugfixed files
This commit is contained in:
@ -19,19 +19,19 @@ class NetStream(INetStream):
|
||||
"""
|
||||
self.protocol_id = protocol_id
|
||||
|
||||
def read(self):
|
||||
async def read(self):
|
||||
"""
|
||||
read from stream
|
||||
:return: bytes of input until EOF
|
||||
"""
|
||||
return self.muxed_stream.read()
|
||||
return await self.muxed_stream.read()
|
||||
|
||||
def write(self, bytes):
|
||||
async def write(self, bytes):
|
||||
"""
|
||||
write to stream
|
||||
:return: number of bytes written
|
||||
"""
|
||||
return self.muxed_stream.write(bytes)
|
||||
return await self.muxed_stream.write(bytes)
|
||||
|
||||
def close(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user