mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
refactor for sprint
This commit is contained in:
25
muxer/mplex/muxed_stream_interface.py
Normal file
25
muxer/mplex/muxed_stream_interface.py
Normal file
@ -0,0 +1,25 @@
|
||||
from abc import ABC, abstractmethod
|
||||
# from datetime import time
|
||||
|
||||
class IMuxedStream(ABC):
|
||||
|
||||
# TODO Reader
|
||||
# TODO Writer
|
||||
# TODO Closer
|
||||
|
||||
@abstractmethod
|
||||
def reset(self):
|
||||
"""
|
||||
closes both ends of the stream
|
||||
tells this remote side to hang up
|
||||
:return: error/exception
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def set_deadline(self, ttl):
|
||||
"""
|
||||
set deadline for muxed stream
|
||||
:return: a new stream
|
||||
"""
|
||||
pass
|
||||
Reference in New Issue
Block a user