X-Git-Url: http://www.average.org/gitweb/?a=blobdiff_plain;f=loctrkd%2Fzmsg.py;h=da0dc77e39da6f38d7eaefe5adbdfe897f928b28;hb=ca67cd29fc86054f08bcbf4995d484bab77a4e60;hp=4da88d2f6754e7e78db97ef8ecc9e989dcd1475c;hpb=ea3dc3f2096472d502d376e13050a59f97efd4a8;p=loctrkd.git diff --git a/loctrkd/zmsg.py b/loctrkd/zmsg.py index 4da88d2..da0dc77 100644 --- a/loctrkd/zmsg.py +++ b/loctrkd/zmsg.py @@ -4,7 +4,7 @@ import ipaddress as ip from struct import pack, unpack from typing import Any, cast, Optional, Tuple, Type, Union -__all__ = "Bcast", "Resp", "topic" +__all__ = "Bcast", "Resp", "topic", "rtopic" def pack_peer( # 18 bytes @@ -100,6 +100,10 @@ def topic( ) +def rtopic(imei: str) -> bytes: + return pack("16s", imei.encode()) + + class Bcast(_Zmsg): """Zmq message to broadcast what was received from the terminal"""