aboutsummaryrefslogtreecommitdiff
path: root/docs/ref/migrate/nng1.md
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-12-26 14:10:09 -0800
committerGarrett D'Amore <garrett@damore.org>2024-12-26 15:57:48 -0800
commit1ad7f88e0c58285c9e1cad9448d5a1fcfa7a07f1 (patch)
tree9d11c07a6f65d5f5a0fb2ba80d916ec8f75cc2d0 /docs/ref/migrate/nng1.md
parent07458cca6791b32215e28c4ac501630ca059e463 (diff)
downloadnng-1ad7f88e0c58285c9e1cad9448d5a1fcfa7a07f1.tar.gz
nng-1ad7f88e0c58285c9e1cad9448d5a1fcfa7a07f1.tar.bz2
nng-1ad7f88e0c58285c9e1cad9448d5a1fcfa7a07f1.zip
aio: nng_aio_defer replaced by nng_aio_start
This represents an API change, and we remove the nng_aio_begin function as well, introducing the lightweight nng_aio_reset instead.
Diffstat (limited to 'docs/ref/migrate/nng1.md')
-rw-r--r--docs/ref/migrate/nng1.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md
index 99afb4d3..9e9b6188 100644
--- a/docs/ref/migrate/nng1.md
+++ b/docs/ref/migrate/nng1.md
@@ -21,6 +21,18 @@ not resubmit an operation that returns it. This is particularly important for ca
resubmit operations. Failure to observe this rule will lead to an infinite loop
as any further operations on the object will fail immediately with `NNG_ESTOPPED`.
+## AIO Provider API changes
+
+The API used for providers for asynchronous I/O operations has changed slightly.
+
+- The `nng_aio_begin` function is removed. However a new [`nng_aio_reset`] function should be called
+ instead, before performing any other operations on an _aio_ object. (This simply clears certain fields.)
+- The `nng_aio_defer` function is replaced, with a very [`nng_aio_start`] function. However, this function
+ has slightly different semantics. It will automatically call the callback if the operation cannot be
+ scheduled.
+- Be aware of the new `NNG_ESTOPPED` error code, for operations on a handle that is being torn down by
+ the consumer.
+
## Transport Specific Functions
Transports have not needed to be registered for a long time now,