浏览代码

Prepare data for server status (Step 10/?) (See #243)

bel2125 8 年之前
父节点
当前提交
b8188d4fb2
共有 1 个文件被更改,包括 26 次插入0 次删除
  1. 26 0
      docs/api/mg_get_context_info.md

+ 26 - 0
docs/api/mg_get_context_info.md

@@ -0,0 +1,26 @@
+# 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`). Otherwise the returned string is in JSON format.
+
+### See Also
+
+* [`mg_get_system_info();`](mg_get_system_info.md)
+