mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-20 11:19:56 +00:00
update to new API
This commit is contained in:
1 parent
199af33b30
commit
ed54b60ea3
11 files changed
+73
-54
No files matched your search
@@ -101,7 +101,8 @@ int main(int argc, char *argv[]) {
|
||||
signal(SIGTERM, signal_handler); // manager loop on SIGINT and SIGTERM
|
||||
|
||||
mg_mgr_init(&mgr);
|
||||
mg_tls_init_client(&mgr, "ca.pem");
|
||||
struct mg_tls_opts opts = {.client_ca = mg_str(CA_ALL)};
|
||||
mg_tls_ctx_init(&mgr, &opts);
|
||||
mg_timer_add(&mgr, 3000, MG_TIMER_REPEAT | MG_TIMER_RUN_NOW, timer_fn, &mgr);
|
||||
while (s_signo == 0) mg_mgr_poll(&mgr, 1000); // Event loop, 1s timeout
|
||||
mg_mgr_free(&mgr); // Finished, cleanup
|
||||
|
||||
Reference in new issue
Block a user