summaryrefslogtreecommitdiffstats
path: root/src/sandbox/wire.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sandbox/wire.rs')
-rw-r--r--src/sandbox/wire.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/sandbox/wire.rs b/src/sandbox/wire.rs
index 8f03063..a0d06ca 100644
--- a/src/sandbox/wire.rs
+++ b/src/sandbox/wire.rs
@@ -2,13 +2,8 @@ use std::io::{self, BufRead, Write};
use serde::{Deserialize, Serialize};
-/// Refuse absurd frames before allocating for them. Blobs ride as hex inside
-/// the frame, so this bounds a real package at ~2 GiB of hex — far above
-/// anything legitimate, far below "accept whatever the sandbox sends".
pub const MAX_FRAME_BYTES: u32 = 2 * 1024 * 1024 * 1024;
-/// One protocol frame. `req` correlates a reply with a request; unsolicited
-/// frames (`Ping`, `Hello`, `HelloAck`) carry none.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "t", rename_all = "snake_case")]
pub enum Frame {
@@ -51,8 +46,6 @@ pub fn write_frame(w: &mut impl Write, f: &Frame) -> io::Result<()> {
w.flush()
}
-/// Read one frame. `Ok(None)` means a clean close, which for a sandbox means
-/// the lease expired and the build should requeue.
pub fn read_frame(r: &mut impl BufRead) -> io::Result<Option<Frame>> {
let mut len = [0u8; 4];
match r.read_exact(&mut len) {