mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
adding additional bugfixed files
This commit is contained in:
@ -36,19 +36,19 @@ class MuxedStream(IMuxedStream):
|
||||
else:
|
||||
return HEADER_TAGS[action] - 1
|
||||
|
||||
def read(self):
|
||||
async def read(self):
|
||||
"""
|
||||
read messages associated with stream from buffer til end of file
|
||||
:return: bytes of input
|
||||
"""
|
||||
return self.muxed_conn.read_buffer(self.id)
|
||||
return await self.muxed_conn.read_buffer(self.id)
|
||||
|
||||
def write(self, data):
|
||||
async def write(self, data):
|
||||
"""
|
||||
write to stream
|
||||
:return: number of bytes written
|
||||
"""
|
||||
return self.muxed_conn.send_message(self.get_flag("MESSAGE"), data, self.id)
|
||||
return await self.muxed_conn.send_message(self.get_flag("MESSAGE"), data, self.id)
|
||||
|
||||
def close(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user