X-Git-Url: http://www.average.org/gitweb/?p=loctrkd.git;a=blobdiff_plain;f=loctrkd%2Fzx303proto.py;h=c47c216134c1e6ff737d01c4107c79351c3c07ea;hp=ebead92e0e28c88f64517547ed8ac1828fa5d301;hb=5ef83cb7db7464a5a625b0b7c86c4e25ebbb0de1;hpb=63a086cf3956b93f760b1a0344afd757e0d0392f diff --git a/loctrkd/zx303proto.py b/loctrkd/zx303proto.py index ebead92..c47c216 100755 --- a/loctrkd/zx303proto.py +++ b/loctrkd/zx303proto.py @@ -92,10 +92,6 @@ class Stream: def __init__(self) -> None: self.buffer = b"" - @staticmethod - def enframe(buffer: bytes, imei: Optional[str] = None) -> bytes: - return b"xx" + buffer + b"\r\n" - def recv(self, segment: bytes) -> List[Union[bytes, str]]: """ Process next segment of the stream. Return successfully deframed @@ -150,6 +146,10 @@ class Stream: return ret +def enframe(buffer: bytes, imei: Optional[str] = None) -> bytes: + return b"xx" + buffer + b"\r\n" + + ### Parser/Constructor ###