server.h

The server.h module provides the entrypoint for running a mn_server instance.

API

struct mn_server
struct mn_config config

The runtime configuration settings needed by the mn_server.

struct mn_route route

The head of the mn_route linked list to compare during pattern matching.

struct mn_status mn_server_run(struct mn_server s[static 1])

Spawn an event loop that waits for new mn_request instances. Passes these, along with an mn_response instance, to the user-defined mn_route_handler_t of an mn_route that matches the request.

Parameters:
  • s – The server instance to start.