NNG_AIO_FINISH(3)

πŸ“¦
version 1.12.0 Β· 4 versions
, in ubuntu stonking

πŸ’– NNG_AIO_FINISH(3) πŸ’–

okay bestie, welcome to the NNG Reference Manual section on nng_aio_finish β€” this one's short but she is IMPORTANT, so pay attention, no skimming 🫢


✨ NAME ✨

nng_aio_finish β€” bestie, we are finishing an asynchronous I/O operation πŸŽ€


✨ SYNOPSIS ✨

#include <nng/nng.h>

void nng_aio_finish(nng_aio *aio, int err);

✨ DESCRIPTION ✨

okay so nng_aio_finish() is the function that goes "this operation? done. finished. periodt." πŸ’… It marks the operation associated with aio as complete, with the status err. That status is literally the result that nng_aio_result() is gonna hand back to whoever's waiting. like, it's the whole point. πŸ¦‹

And bestie, it also causes the callback associated with the aio to be called. so like, the callback gets its moment. iconic behavior honestly ✨

Important 🚨 It is mandatory that operation providers call this function exactly once when they are finished with the operation. not twice, not zero times β€” exactly once. And after calling this function they must not perform any further accesses to the aio. like, that pointer? it's over for you. don't touch it. πŸ”₯
Note 🌸 This function is only for I/O providers β€” the ones actually performing the operation, like HTTP handler functions or transport providers. ordinary users of the aio should not have any need for this function. so if you're just vibing with an aio as a regular user, this is not your girl. iykyk 😭

✨ RETURN VALUES ✨

None. literally nothing comes back. void. empty. a whole lot of nothing πŸ’€


✨ ERRORS ✨

None. no errors to report, no codes to check, nothing to stress about πŸ’–


✨ SEE ALSO ✨


and that's the whole page bestie, you ate that πŸ“ go forth and finish your async I/O operations exactly once, no cap πŸ‘‘

πŸ’– NNG Reference Manual Β· 2026-06-30 Β· mwah, love u, bye πŸ’–

πŸ“¦ where this page comes from