zirobtc commited on
Commit
d5dcccd
·
verified ·
1 Parent(s): f4d3a23

Uploading DART folder into model repo

Browse files
Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -24,6 +24,8 @@ PORT = config["PORT"]
24
  print(f"Connecting to {HOST}:{PORT}")
25
  MAGIC = 0x2333
26
 
 
 
27
  def patch_socket_keepalive(sock: socket.socket) -> None:
28
  """Set keepalive + long timeout to prevent halts on idle."""
29
  sock.settimeout(None) # Never timeout on recv
@@ -55,7 +57,6 @@ def send_frame(sock: socket.socket, event: str, payload: Any) -> None:
55
  header = struct.pack("<III", MAGIC, len(raw), len(comp))
56
  sock.sendall(header + comp)
57
 
58
- MAGIC_JSON = 0xDEADBEEF
59
 
60
  def recv_frame(sock: socket.socket) -> Dict[str, Any]:
61
  header = recv_exact(sock, 12)
 
24
  print(f"Connecting to {HOST}:{PORT}")
25
  MAGIC = 0x2333
26
 
27
+ MAGIC_JSON = config["MAGIC"]
28
+
29
  def patch_socket_keepalive(sock: socket.socket) -> None:
30
  """Set keepalive + long timeout to prevent halts on idle."""
31
  sock.settimeout(None) # Never timeout on recv
 
57
  header = struct.pack("<III", MAGIC, len(raw), len(comp))
58
  sock.sendall(header + comp)
59
 
 
60
 
61
  def recv_frame(sock: socket.socket) -> Dict[str, Any]:
62
  header = recv_exact(sock, 12)