Skip to main content

Module codec

Module codec 

Source
Expand description

NDJSON framing over a tokio duplex stream.

FramedConn wraps any tokio::io duplex stream and implements WireConn by buffering reads until a newline and serializing writes with a trailing newline + flush. take_frame is the pure framing helper, extracted so it can be unit-tested without an executor.

Structs§

FramedConn
Generic NDJSON framing over any duplex stream.

Functions§

take_frame
Try to pull one complete NDJSON frame out of rd_buf.