Function contentLengthDrain [src]

Prototype

pub fn contentLengthDrain(w: *Writer, data: []const []const u8, splat: usize) Error!usize

Parameters

w: *Writerdata: []const []const u8splat: usize

Possible Errors

WriteFailed Error

See the Writer implementation for detailed diagnostics.

Source

pub fn contentLengthDrain(w: *Writer, data: []const []const u8, splat: usize) Error!usize { const bw: *BodyWriter = @alignCast(@fieldParentPtr("writer", w)); assert(!bw.isEliding()); const out = bw.http_protocol_output; const n = try out.writeSplatHeader(w.buffered(), data, splat); bw.state.content_length -= n; return w.consume(n); }