picoev, x.vweb: small fixes and backport changes from vweb (#20584)

This commit is contained in:
Casper Küthe 2024-01-23 17:34:22 +01:00 committed by GitHub
parent 2874e7cac0
commit d88ca11a4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 319 additions and 129 deletions

View file

@ -44,8 +44,8 @@ pub:
max_headers int = 100
max_read int = 4096
max_write int = 8192
family net.AddrFamily = .ip
host string = 'localhost'
family net.AddrFamily = .ip6
host string
}
@[heap]
@ -302,8 +302,8 @@ fn default_err_cb(data voidptr, req picohttpparser.Request, mut res picohttppars
}
// new creates a `Picoev` struct and initializes the main loop
pub fn new(config Config) &Picoev {
listen_fd := listen(config)
pub fn new(config Config) !&Picoev {
listen_fd := listen(config)!
mut pv := &Picoev{
num_loops: 1