mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-15 17:30:53 +08:00
cf2528eb7c
完善了非阻塞IO的SSL功能;将 acl/samples/ 下的示例分别移到 lib_acl 及 lib_protocol 目录下
30 lines
785 B
C
30 lines
785 B
C
#include "app_main.h"
|
|
#include "app_log.h"
|
|
#include "service_main.h"
|
|
|
|
static const char reply_403_close[] = "HTTP/1.1 403 Permission denied\r\n"
|
|
"Accept-Ranges: bytes\r\n"
|
|
"Server: dict_http/1.0.0 (Unix)\r\n"
|
|
"Content-Length: 9\r\n"
|
|
"Connection: close\r\n"
|
|
"\r\n"
|
|
"403 Permission denied!\r\n";
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
/* acl_debug_malloc_init("log.txt"); */
|
|
app_main(argc, argv, service_main, NULL,
|
|
APP_CTL_INIT_FN, service_init,
|
|
/* APP_CTL_INIT_CTX, NULL, */
|
|
APP_CTL_EXIT_FN, service_exit,
|
|
/* APP_CTL_EXIT_CTX, NULL, */
|
|
APP_CTL_CFG_BOOL, service_conf_bool_tab,
|
|
APP_CTL_CFG_INT, service_conf_int_tab,
|
|
APP_CTL_CFG_STR, service_conf_str_tab,
|
|
APP_CTL_DENY_INFO, reply_403_close,
|
|
APP_CTL_END);
|
|
|
|
exit (0);
|
|
}
|
|
|