This commit is contained in:
zixuanzh
2018-11-12 13:02:49 -05:00
parent b4272918d9
commit c5c9d3e5c9
17 changed files with 66 additions and 84 deletions

View File

@ -1,5 +1,6 @@
from abc import ABC, abstractmethod
class IHost(ABC):
@abstractmethod
@ -36,9 +37,8 @@ class IHost(ABC):
# protocol_id can be a list of protocol_ids
# stream will decide which protocol_id to run on
@abstractmethod
def new_stream(self, context, peer_id, protocol_id):
def new_stream(self, peer_id, protocol_id):
"""
:param context: a context instance
:param peer_id: peer_id that host is connecting
:param proto_id: protocol id that stream runs on
:return: true if successful