Github User Fetcher 1.0.0
C Application with Server and GUI
|
Declaration of the HTTP server functions. More...
Go to the source code of this file.
Functions | |
void | start_http_server (int port) |
Starts the HTTP server. | |
Declaration of the HTTP server functions.
Definition in file server.h.
void start_http_server | ( | int | port | ) |
Starts the HTTP server.
Initializes and runs the Civetweb server on the specified port.
port | TCP port number to listen on. |
Starts the HTTP server.
Configures Civetweb with basic options and handles incoming user requests. The server runs indefinitely until manually interrupted.
port | The TCP port to listen on. |
Starts the HTTP server.
Sets up an io_context
, signal handlers for graceful shutdown, and an asynchronous TCP acceptor to listen for and handle incoming HTTP connections using HttpSession
.
The server runs in a multi-threaded fashion, utilizing all available hardware threads.
port | The port number on which the HTTP server should listen. |
Lambda for accepting incoming connections recursively.
This lambda captures itself and re-issues accept calls until the server is stopped.
Definition at line 59 of file server.c.
References mg_context::callbacks, free, mg_set_request_handler(), mg_start(), mg_stop(), NULL, printf, and user_handler().
Referenced by main(), and TEST_CASE().