aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/nng/nng.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/nng/nng.h b/include/nng/nng.h
index 2563bc1e..b3daedb0 100644
--- a/include/nng/nng.h
+++ b/include/nng/nng.h
@@ -618,10 +618,10 @@ NNG_DECL void nng_aio_set_expire(nng_aio *, nng_time);
// to succeed if n <= 4, otherwise it may fail due to NNG_ENOMEM.
NNG_DECL int nng_aio_set_iov(nng_aio *, unsigned, const nng_iov *);
-// nng_aio_begin is called by the provider to mark the operation as
-// beginning. If it returns false, then the provider must take no
-// further action on the aio.
-NNG_DECL bool nng_aio_begin(nng_aio *);
+// nng_aio_reset is called by the provider before doing other operations on the
+// aio. Its purpose is to clear certain output fields, to avoid accidental
+// reuse from prior operations on the aio.
+NNG_DECL void nng_aio_reset(nng_aio *);
// nng_aio_finish is used to "finish" an asynchronous operation.
// It should only be called by "providers" (such as HTTP server API users).
@@ -630,7 +630,7 @@ NNG_DECL bool nng_aio_begin(nng_aio *);
// given aio.
NNG_DECL void nng_aio_finish(nng_aio *, int);
-// nng_aio_defer is used to register a cancellation routine, and indicate
+// nng_aio_start is used to register a cancellation routine, and indicate
// that the operation will be completed asynchronously. It must only be
// called once per operation on an aio, and must only be called by providers.
// If the operation is canceled by the consumer, the cancellation callback
@@ -642,9 +642,9 @@ NNG_DECL void nng_aio_finish(nng_aio *, int);
// to the reason for cancellation, e.g. NNG_ETIMEDOUT or NNG_ECANCELED.
// This returns false if the operation cannot be deferred (because the AIO
// has been stopped with nng_aio_stop.) If it does so, then the aio's
-// completion callback will fire with a result of NNG_ECLOSED.
+// completion callback will fire with a result of NNG_ESTOPPED.
typedef void (*nng_aio_cancelfn)(nng_aio *, void *, int);
-NNG_DECL bool nng_aio_defer(nng_aio *, nng_aio_cancelfn, void *);
+NNG_DECL bool nng_aio_start(nng_aio *, nng_aio_cancelfn, void *);
// nng_aio_sleep does a "sleeping" operation, basically does nothing
// but wait for the specified number of milliseconds to expire, then