vcpe/srcs/libs/network/http_svr.c

23 lines
633 B
C
Raw Normal View History

//
// Created by xajhuang on 2022/11/4.
//
#include "http_svr.h"
#include "user_errno.h"
#include "haywire.h"
2022-11-07 06:38:30 +00:00
#include "config.h"
int http_svr_init() {
configuration config;
2022-12-02 06:42:15 +00:00
config.http_listen_address = (char *)config_get_http_server_addr();
2022-11-07 06:38:30 +00:00
config.http_listen_port = config_get_http_server_port();
config.thread_count = 0;
config.parser = "http_parser";
config.balancer = "ipc";
2022-11-07 06:38:30 +00:00
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;
}