Function init [src]
Initialize an HTTP server that can respond to multiple requests on the same
connection.
The returned Server is ready for receiveHead to be called.
Prototype
pub fn init(connection: net.Server.Connection, read_buffer: []u8) Server
Parameters
connection: net.Server.Connection
read_buffer: []u8
Source
pub fn init(connection: net.Server.Connection, read_buffer: []u8) Server {
return .{
.connection = connection,
.state = .ready,
.read_buffer = read_buffer,
.read_buffer_len = 0,
.next_request_start = 0,
};
}