File: mg_get_context_info.md

package info (click to toggle)
civetweb 1.16%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,576 kB
  • sloc: ansic: 32,463; cpp: 1,374; sh: 480; javascript: 204; makefile: 119; php: 11; perl: 6; python: 3
file content (32 lines) | stat: -rw-r--r-- 988 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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.

### See Also

* [`mg_get_system_info();`](mg_get_system_info.md)
* [`mg_get_connection_info();`](mg_get_connection_info.md)