Function writer [src]
HTTP protocol from client to server.
This either goes directly to stream_writer, or to a TLS client.
Prototype
pub fn writer(c: *Connection) *Writer Parameters
c: *Connection Source
pub fn writer(c: *Connection) *Writer {
return switch (c.protocol) {
.tls => {
if (disable_tls) unreachable;
const tls: *Tls = @alignCast(@fieldParentPtr("connection", c));
return &tls.client.writer;
},
.plain => &c.stream_writer.interface,
};
}