X-Git-Url: http://average.org/gitweb/?a=blobdiff_plain;f=loctrkd%2Fwsgateway.py;h=b6d10e84798f89e7b36e322074f9afb115d50489;hb=b965fecb08f4149f6f91770e9d6bb6d79f53f11e;hp=8f2c6484b2fea8515909be63e22c45d21b3abd8e;hpb=15537c8be40f3ba25c5a51af75d9bed53a8a215d;p=loctrkd.git diff --git a/loctrkd/wsgateway.py b/loctrkd/wsgateway.py index 8f2c648..b6d10e8 100644 --- a/loctrkd/wsgateway.py +++ b/loctrkd/wsgateway.py @@ -23,25 +23,12 @@ import zmq from . import common from .evstore import initdb, fetch +from .protomodule import ProtoModule from .zmsg import Bcast, topic log = getLogger("loctrkd/wsgateway") -class ProtoModule: - @staticmethod - def parse_message(packet: bytes, is_incoming: bool = True) -> Any: - ... - - @staticmethod - def exposed_protos() -> List[Tuple[str, bool]]: - ... - - @staticmethod - def proto_handled(proto: str) -> bool: - ... - - htmlfile = None pmods: List[ProtoModule] = [] selector: List[Tuple[bool, str]] = [] @@ -274,7 +261,7 @@ def runserver(conf: ConfigParser) -> None: global htmlfile, pmods, selector pmods = [ cast(ProtoModule, import_module("." + modnm, __package__)) - for modnm in conf.get("collector", "protocols").split(",") + for modnm in conf.get("common", "protocols").split(",") ] for pmod in pmods: for proto, is_incoming in pmod.exposed_protos():