mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-07 21:05:29 +08:00
23122b327c
It would be probably good idea to also remove tools/docgen.py and asciidoc.mk, but asciidoc.mk is still mentioned under `cloud/doc`, which may contain some useful info which we'll need at least to review before removing. PUBLISHED_FROM=faf454d4c52a2f07ea8ac084cf0bd11a0c9c9b3b
645 B
645 B
title | decl_name | symbol_kind | signature |
---|---|---|---|
mg_serve_http() | mg_serve_http | func | void mg_serve_http(struct mg_connection *nc, struct http_message *hm, struct mg_serve_http_opts opts); |
Serve given HTTP request according to the options
.
Example code snippet:
static void ev_handler(struct mg_connection *nc, int ev, void *ev_data) {
struct http_message *hm = (struct http_message *) ev_data;
struct mg_serve_http_opts opts = { .document_root = "/var/www" }; // C99
switch (ev) {
case MG_EV_HTTP_REQUEST:
mg_serve_http(nc, hm, opts);
break;
default:
break;
}
}