Add "default protocols" that all hosts have by default

This commit is contained in:
Alex Stokes
2019-09-24 17:19:22 -07:00
parent 73251a0c36
commit c92bade815
3 changed files with 20 additions and 5 deletions

View File

@ -19,8 +19,8 @@ class Multiselect(IMultiselectMuxer):
handlers: Dict[TProtocol, StreamHandlerFn]
def __init__(self) -> None:
self.handlers = {}
def __init__(self, default_handlers: Dict[TProtocol, StreamHandlerFn] = {}) -> None:
self.handlers = default_handlers
def add_handler(self, protocol: TProtocol, handler: StreamHandlerFn) -> None:
"""