// // Created by xajhuang on 2022/11/4. // #include "http_svr.h" #include "user_errno.h" #include "haywire.h" #include "config.h" int http_svr_init() { configuration config; config.http_listen_address = (char *)config_get_http_server_addr(); config.http_listen_port = config_get_http_server_port(); config.thread_count = 0; config.parser = "http_parser"; config.balancer = "ipc"; config.tcp_nodelay = config_get_http_server_tcp_nodelay(); config.max_request_size = 1048576; hw_init_with_config(&config); hw_http_open(); return ERR_SUCCESS; }