summaryrefslogtreecommitdiffstats
path: root/src/civetweb/docs/api/mg_get_user_connection_data.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/civetweb/docs/api/mg_get_user_connection_data.md')
-rw-r--r--src/civetweb/docs/api/mg_get_user_connection_data.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/civetweb/docs/api/mg_get_user_connection_data.md b/src/civetweb/docs/api/mg_get_user_connection_data.md
new file mode 100644
index 000000000..2e24c1340
--- /dev/null
+++ b/src/civetweb/docs/api/mg_get_user_connection_data.md
@@ -0,0 +1,23 @@
+# Civetweb API Reference
+
+### `mg_get_user_connection_data( conn );`
+
+### Parameters
+
+| Parameter | Type | Description |
+| :--- | :--- | :--- |
+|**`conn`**|`const struct mg_connection *`|The connection for which to return the user data|
+
+### Return Value
+
+| Type | Description |
+| :--- | :--- |
+|`void *`|A pointer to the user data, or NULL if no user data was registered with the connection|
+
+### Description
+
+The function `mg_get_user_connection_data()` returns the user data associated with a connection. This user data is represented with a pointer which has been prevously registered with a call to [`mg_set_user_connection_data();`](mg_set_user_connection_data.md). With this function it is possible to pass state information between callback functions refering to a specific connection.
+
+### See Also
+
+* [`mg_set_user_connection_data();`](mg_set_user_connection_data.md)