Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-sock-client/Cargo.toml
atlas 1f214f9f01 bound the request line on the host admin and in-agent sockets
hive-c0re's admin socket and hive-agent's in-agent socket (mode 0666) read
the request with an unbounded read_line: no length cap and no deadline, so
a peer that never sends a newline grows a buffer and pins a task forever.

The bounded reader (16 MiB cap) moves from hive-c0re's socket_server into
hive-sock-client, the one crate both daemons already share or can take, and
gains optional deadlines for the first byte and for the rest of the line.
Both sockets now use it and answer an over-long or stalled line with the
same error reply the bounded sockets give, then close. The admin socket
bounds only the started line (clients may idle between requests); the
in-agent socket is single-shot and bounds silence too. The per-agent
sockets keep their behaviour (no deadline).
2026-10-17 09:09:20 +02:00

22 lines
751 B
TOML

# `hive-sock-client` — the one JSON-line-over-unix-socket client shared by
# every daemon that talks to a hyperhive socket, plus the bounded
# request-line reader the socket servers share. Protocol-agnostic on
# purpose: it is generic over the request/response types, so it works for
# the host-served control socket and the harness's in-agent socket alike.
# Deliberately NOT folded into one of the `*-sock` wire-type crates —
# those stay dependency-free type definitions.
[package]
name = "hive-sock-client"
edition.workspace = true
version.workspace = true
readme = "README.md"
[lints]
workspace = true
[dependencies]
anyhow.workspace = true
serde.workspace = true
serde_json.workspace = true
tokio.workspace = true
tracing.workspace = true