archive
/
ipc-unix
Archived
1
Fork 0
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

12 lines
218 B
Python
Raw Normal View History

2018-12-07 20:35:34 +00:00
import ujson
def read_payload(payload):
data = b""
while b"\n" not in data:
2018-12-07 23:18:29 +00:00
message = payload.recv(2)
2018-12-07 20:35:34 +00:00
if message == b"":
break
data += message
return ujson.loads(data)