23 lines
546 B
C
23 lines
546 B
C
|
//
|
||
|
// Created by xajhuang on 2022/11/4.
|
||
|
//
|
||
|
#include "http_svr.h"
|
||
|
#include "user_errno.h"
|
||
|
#include "haywire.h"
|
||
|
#include "misc.h"
|
||
|
|
||
|
int http_svr_init() {
|
||
|
configuration config;
|
||
|
config.http_listen_address = "0.0.0.0";
|
||
|
config.http_listen_port = 8000;
|
||
|
config.thread_count = 0;
|
||
|
config.parser = "http_parser";
|
||
|
config.balancer = "ipc";
|
||
|
config.tcp_nodelay = TRUE;
|
||
|
config.max_request_size = 1048576;
|
||
|
|
||
|
hw_init_with_config(&config);
|
||
|
|
||
|
hw_http_open();
|
||
|
return ERR_SUCCESS;
|
||
|
}
|