#include #include #include #include #include "handlers.h" int main(int argc, char ** argv) { struct MHD_Daemon * d; if (argc != 2) { printf("%s PORT\n", argv[0]); return 1; } d = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION, atoi(argv[1]), NULL, NULL, &handle_all, NULL, MHD_OPTION_END); if (d == NULL) return 1; (void) getc (stdin); MHD_stop_daemon(d); return 0; }