aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-12-22 12:41:44 -0800
committerGarrett D'Amore <garrett@damore.org>2024-12-22 12:41:44 -0800
commit113e3606bd1a763850db1afee336bb0d5d434317 (patch)
tree681bb2f8d71c399fbfe4502b8573ce9e3d9a8fe1 /docs
parent8c14ed19b5c72f060f31767e5bc4106054e41192 (diff)
downloadnng-113e3606bd1a763850db1afee336bb0d5d434317.tar.gz
nng-113e3606bd1a763850db1afee336bb0d5d434317.tar.bz2
nng-113e3606bd1a763850db1afee336bb0d5d434317.zip
http: nng_http_handler_set_data is now void return (API break)
Diffstat (limited to 'docs')
-rw-r--r--docs/man/nng_http_handler_set_data.3http.adoc14
-rw-r--r--docs/ref/migrate/nng1.md6
2 files changed, 7 insertions, 13 deletions
diff --git a/docs/man/nng_http_handler_set_data.3http.adoc b/docs/man/nng_http_handler_set_data.3http.adoc
index cb94adbc..94cb9b4c 100644
--- a/docs/man/nng_http_handler_set_data.3http.adoc
+++ b/docs/man/nng_http_handler_set_data.3http.adoc
@@ -1,6 +1,6 @@
= nng_http_handler_set_data(3http)
//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This document is supplied under the terms of the MIT License, a
@@ -20,7 +20,7 @@ nng_http_handler_set_data - set extra data for HTTP handler
#include <nng/nng.h>
#include <nng/supplemental/http/http.h>
-int nng_http_handler_set_data(nng_http_handler *handler, void *data,
+void nng_http_handler_set_data(nng_http_handler *handler, void *data,
void (*dtor)(void *));
----
@@ -36,16 +36,6 @@ then it will be called with _data_ as its argument.
The intended use of
this function is deallocate any resources associated with _data_.
-== RETURN VALUES
-
-This function returns 0 on success, and non-zero otherwise.
-
-== ERRORS
-
-[horizontal]
-`NNG_ENOMEM`:: Insufficient free memory to perform the operation.
-`NNG_ENOTSUP`:: No support for HTTP in the library.
-
== SEE ALSO
[.text-left]
diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md
index 8186e5cb..4390de24 100644
--- a/docs/ref/migrate/nng1.md
+++ b/docs/ref/migrate/nng1.md
@@ -230,16 +230,20 @@ they may be silently truncated to the limit:
- The fixed part of URI pathnames used with HTTP handlers is limited to 1024 bytes.
The following API calls have changed so that they are `void` returns, and cannot fail.
-They may silently truncate data, and the handler methods may not have any effect if the handler is already in use.
+They may silently truncate data.
- [`nng_http_req_set_method`]
- [`nng_http_res_set_status`]
- [`nng_http_handler_collect_body`]
+- [`nng_http_handler_set_data`]
- [`nng_http_handler_set_host`]
- [`nng_http_handler_set_method`]
- [`nng_http_handler_set_tree`]
- [`nng_http_handler_set_tree_exclusive`]
+The HTTP handler objects may not be modified once in use. Previously this would fail with `NNG_EBUSY`.
+These checks are removed now, but debug builds will assert if an application tries to do so.
+
## Security Descriptors (Windows Only)
The `NNG_OPT_IPC_SECURITY_DESCRIPTOR` option is removed, and replaced