This is a dependency of our upcoming web-based material debugger. This
CL also includes `tnt/CMakeLists.txt`, which builds a static lib in a
minimal configuration that enables WebSocket support. The entire library
is built from only 4 files:
${PUBLIC_HDR_DIR}/CivetServer.h
${PUBLIC_HDR_DIR}/civetweb.h
${SRC_DIR}/civetweb.c
${SRC_DIR}/CivetServer.cpp
988 B
988 B
Civetweb API Reference
mg_get_context_info( ctx, buffer, buflen );
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx |
struct mg_context * |
The server context handle |
buffer |
char * |
A string buffer to store the information |
buflen |
int |
Size of the string buffer (including space for a terminating 0) |
Return Value
| Type | Description |
|---|---|
int |
Available context information in bytes (excluding the terminating 0) |
Description
The function mg_get_context_info() returns statistics information collected for
the server context. This may be empty if the server has not been built with
statistics support (#define USE_SERVER_STATS).
If data is available, the returned string is in JSON format. The exact content may
vary, depending on the server state and server version.