mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-04-13 09:21:27 +00:00
refactor for sprint
This commit is contained in:
34
muxer/mplex/muxed_stream.py
Normal file
34
muxer/mplex/muxed_stream.py
Normal file
@ -0,0 +1,34 @@
|
||||
from .muxed_stream_interface import IMuxedStream
|
||||
|
||||
class MuxedStream(IMuxedStream):
|
||||
"""
|
||||
reference: https://github.com/libp2p/go-mplex/blob/master/stream.go
|
||||
"""
|
||||
|
||||
def __init__(self, protocol_id, stream_name):
|
||||
self.protocol_id = protocol_id
|
||||
self.name = stream_name
|
||||
|
||||
def read(self):
|
||||
pass
|
||||
|
||||
def write(self):
|
||||
pass
|
||||
|
||||
def close(self):
|
||||
pass
|
||||
|
||||
def reset(self):
|
||||
"""
|
||||
closes both ends of the stream
|
||||
tells this remote side to hang up
|
||||
:return: error/exception
|
||||
"""
|
||||
pass
|
||||
|
||||
def set_deadline(self, ttl):
|
||||
"""
|
||||
set deadline for muxed stream
|
||||
:return: a new stream
|
||||
"""
|
||||
pass
|
||||
Reference in New Issue
Block a user