| 64 | } |
| 65 | |
| 66 | int main(void) { |
| 67 | struct mg_mgr mgr; |
| 68 | |
| 69 | mg_log_set(s_debug_level); |
| 70 | mg_mgr_init(&mgr); |
| 71 | |
| 72 | if (mg_http_listen(&mgr, s_http_addr, http_ev_handler, NULL) == NULL) { |
| 73 | exit(EXIT_FAILURE); |
| 74 | } |
| 75 | |
| 76 | if (mg_http_listen(&mgr, s_https_addr, https_ev_handler, NULL) == NULL) { |
| 77 | exit(EXIT_FAILURE); |
| 78 | } |
| 79 | |
| 80 | MG_INFO(("Mongoose version : v%s", MG_VERSION)); |
| 81 | MG_INFO(("HTTP listener : %s", s_http_addr)); |
| 82 | MG_INFO(("HTTPS listener : %s", s_https_addr)); |
| 83 | for (;;) { |
| 84 | mg_mgr_poll(&mgr, 1000); |
| 85 | } |
| 86 | |
| 87 | mg_mgr_free(&mgr); |
| 88 | return 0; |
| 89 | } |
nothing calls this directly
no test coverage detected