NNG_AIO_CANCEL(3)
π nng_aio_cancel β cancel asynchronous I/O operation π
okay bestie so this is nng_aio_cancel from the NNG Reference Manual, and she's literally the β¨girlbossβ¨ of "never mind, stop that" π
β¨ SYNOPSIS β¨
#include <nng/nng.h>
void nng_aio_cancel(nng_aio *aio);
like look at her. clean. simple. no return value. iconic. π
πΈ DESCRIPTION πΈ
okay so here's the tea π β nng_aio_cancel() aborts an operation that you previously started with the handle aio.
and when the operation actually gets aborted? the callback for that handle gets called π, and nng_aio_result() will come back handing you the error NNG_ECANCELED. so fr fr, you'll know.
now β and this part is important, don't skip it β this function does not wait around for the operation to be fully aborted. she does not sit there tapping her acrylics waiting for closure. she returns immediately. πβοΈπ¨ she said "I sent the text, I'm moving on."
and if there's no operation currently in progress? like, either it already finished, or you never started one in the first place? then this function just... has no effect. nothing. zip. it's giving "hey bestie are you okay" "yeah I just have nothing to cancel" π
Note π β this function is the same as callingnng_aio_abort()with the errorNNG_ECANCELED. same energy, different name, they're twins π―βοΈ
π RETURN VALUES π
None.
nothing. it's void. she gives you no receipts, no nothing. π«Ά
π¦ ERRORS π¦
None.
zero errors. cannot fail. cannot be stopped (except the operation itself, which is literally the point). slay. β¨
π SEE ALSO π
go read those too, bestie, iykyk π
and that's a wrap on this page from the NNG Reference Manual, dated 2026-06-30 πΈ mwah, take care of yourself, hydrate, and cancel those async ops with confidence. periodt. π β¨π
π¦ where this page comes from
- ubuntu stonking: libnng-dev 1.12.0-1 Β· MIT OR Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms