aboutsummaryrefslogtreecommitdiff
path: root/docs/ref/api
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-10-11 15:50:52 -0700
committerGarrett D'Amore <garrett@damore.org>2025-10-11 15:50:52 -0700
commit9812f429c5ba4bc8caae14213a11446057369fa9 (patch)
tree8218a7c4256c029f8189322e78a8eb80a33d9502 /docs/ref/api
parent2f24a1b1c93b8c45dce391ed0439131f9ad8cf28 (diff)
downloadnng-9812f429c5ba4bc8caae14213a11446057369fa9.tar.gz
nng-9812f429c5ba4bc8caae14213a11446057369fa9.tar.bz2
nng-9812f429c5ba4bc8caae14213a11446057369fa9.zip
docs: convert http_handler_free doc
Diffstat (limited to 'docs/ref/api')
-rw-r--r--docs/ref/api/http.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/ref/api/http.md b/docs/ref/api/http.md
index 05821cbc..c02881d5 100644
--- a/docs/ref/api/http.md
+++ b/docs/ref/api/http.md
@@ -644,6 +644,21 @@ sent, if possible, and the connection will be closed.
The _aio_ may be scheduled for deferred completion using the [`nng_aio_start`].
+### Freeing Handler
+
+```c
+void nng_http_handler_free(nng_http_handler *h);
+```
+
+The {{i:`nng_http_handler_free`}} function frees an allocated HTTP server handler.
+Normally there is no reason to call this function, because the handler is freed with
+the server it was registered with.
+
+> [!IMPORTANT]
+> It is an error to free a handler that is registered with a server.
+> Any handlers that are registered with servers are automatically freed
+> when the server itself is deallocated.
+
### Serving Directories and Files
```c