Skip to main content

PACED_PIECE

Constant PACED_PIECE 

Source
pub const PACED_PIECE: usize = _; // 16_384usize
Expand description

The size of one piece a PacedBody hands the HTTP stack: 16 KiB.

Once the stack’s write buffer is full it pulls about one piece per piece written, so a live link must move one piece per stall bound to be seen moving. At 16 KiB over the default 20 s stall bound that is 0.8 KiB/s — below the server’s 1 KiB/s minimum sustained rate, so the client never cuts as stalled a link the server would accept. Large enough that the per-piece bookkeeping is noise beside the bytes.