This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
ipc-unix/ipc_unix/utils.py

11 lines
221 B
Python

import ujson
def read_payload(payload):
data = b""
while b"\n" not in data:
message = payload.recv(4096)
if message == b"":
break
data += message
return ujson.loads(data)