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
return ret
+def enframe(buffer: bytes, imei: Optional[str] = None) -> bytes:
+ return b"xx" + buffer + b"\r\n"
+
+
### Parser/Constructor ###