api

server.ch

Declarations in server.ch

1 declarationshttp

Declarations

Public only
server#
Publicnamespace
namespace server
===== Server wiring all pieces together =====
ServerConfig#
Publicstruct
struct ServerConfig { var addr : string var worker_count : uint var header_timeout_secs : long var max_header_bytes : usize var max_headers : uint var max_body_bytes : usize var cert_file : string var key_file : string }
constructor#
PublicfunctionConstructor
func constructor() : ServerConfig
PEM RSA private key file path
delete#
function
func delete(self : *ServerConfig) : void
Server#
Publicstruct
struct Server { var cfg : ServerConfig var pool : ThreadPool var listen_sock : Socket var router : Router var run : bool var tls_cert : *X509Cert var tls_rsa_key : *void }
constructor#
PublicfunctionConstructor
func constructor(cfg_ : ServerConfig) : Server
loaded RSA private key (null = plain HTTP)
handle_conn#
Publicfunction
func handle_conn(self : &Server, s : Socket) : void
accept_main#
Publicfunction
func accept_main(arg : *void) : *void
start#
Publicfunction
func start(self : &Server, default_port : uint) : void
serve_non_iocp#
Publicfunction
func serve_non_iocp(self : &Server, port : uint) : void
serve_async#
Publicfunction
func serve_async(self : &Server, port : uint) : Thread
serve#
Publicfunction
func serve(self : &Server, port : uint) : void
shutdown#
Publicfunction
func shutdown(self : &Server) : void
delete#
function
func delete(self : *Server) : void