srctree

Gregory Mullen parent 1a224c2f 7349391f
move some functions in Frame.zig pt 2

src/frame.zig added: 18, removed: 16, total 2
@@ -42,27 +42,13 @@ status: ?std.http.Status = null,
 
const Frame = @This();
 
const SendError = error{
pub const SendError = error{
WrongPhase,
HeadersFinished,
ResponseClosed,
UnknownStatus,
} || NetworkError;
 
const ONESHOT_SIZE = 14720;
const HEADER_VEC_COUNT = 64; // 64 ought to be enough for anyone!
 
const Downstream = enum {
buffer,
zwsgi,
http,
};
 
const VarPair = struct {
[]const u8,
[]const u8,
};
 
/// Warning leaks like a sieve while I ponder the API
pub const RouteData = struct {
items: std.ArrayList(Pair),
@@ -175,6 +161,22 @@ pub fn headersAdd(vrs: *Frame, comptime name: []const u8, value: []const u8) !vo
try vrs.headers.add(name, value);
}
 
const ONESHOT_SIZE = 14720;
const HEADER_VEC_COUNT = 64; // 64 ought to be enough for anyone!
 
const Downstream = enum {
buffer,
zwsgi,
http,
};
 
const VarPair = struct {
[]const u8,
[]const u8,
};
 
// The remaining functions are internal
 
fn writeChunk(vrs: Frame, data: []const u8) !void {
comptime unreachable;
var size: [19]u8 = undefined;