implemented the option added in the previous commit

This commit is contained in:
2023-11-17 16:57:12 +09:00
parent aef6a81380
commit d2725688e0
17 changed files with 135 additions and 58 deletions

View File

@ -1245,7 +1245,7 @@ for (i = 0; i < 5; i++)
HIO_INFO1 (hio, "UNABLE TO START DNC - %js\n", hio_geterrmsg(hio));
}
htts = hio_svc_htts_start(hio, 0, &htts_bind_info, 1, process_http_request, HIO_NULL);
htts = hio_svc_htts_start(hio, 0, &htts_bind_info, 1, process_http_request);
if (htts) hio_svc_htts_setservernamewithbcstr (htts, "HIO-HTTP");
else HIO_INFO1 (hio, "UNABLE TO START HTTS - %js\n", hio_geterrmsg(hio));

View File

@ -263,7 +263,7 @@ void* thr_func (void* arg)
htts_bind_info[1].ssl_keyfile = "localhost.key";
#endif
htts = hio_svc_htts_start(hio, 0, htts_bind_info, HIO_COUNTOF(htts_bind_info), process_http_request, HIO_NULL);
htts = hio_svc_htts_start(hio, 0, htts_bind_info, HIO_COUNTOF(htts_bind_info), process_http_request);
if (!htts)
{
printf ("Unable to start htts\n");

View File

@ -417,12 +417,26 @@ int webs_start (hio_t* hio, const arg_info_t* ai)
}
HIO_MEMSET (&fcgic_tmout, 0, HIO_SIZEOF(fcgic_tmout));
fcgic_tmout.c.sec = 5;
fcgic_tmout.r.sec = 60;
HIO_INIT_NTIME(&fcgic_tmout.c, 5, 0);
HIO_INIT_NTIME(&fcgic_tmout.r, 60, 0);
HIO_INIT_NTIME(&fcgic_tmout.w, -1, 0);
webs = hio_svc_htts_start(hio, HIO_SIZEOF(htts_ext_t), bi, bic, process_http_request, &fcgic_tmout);
webs = hio_svc_htts_start(hio, HIO_SIZEOF(htts_ext_t), bi, bic, process_http_request);
if (!webs) return -1; /* TODO: logging */
{
hio_oow_t ov;
ov = 1000;
hio_svc_htts_setoption (webs, HIO_SVC_HTTS_TASK_CGI_MAX, &ov);
}
if (hio_svc_htts_enablefcgic(webs, &fcgic_tmout) <= -1)
{
/* TODO: logging */
hio_svc_htts_stop (webs);
return -1;
}
ext = hio_svc_htts_getxtn(webs);
ext->ai = ai;