NNG_AIO_RESULT(3)

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

✨ NNG_AIO_RESULT ✨

okay bestie, welcome to the NNG_AIO_RESULT(3) page from the NNG Reference Manual πŸ’– this one is short and sweet and it's giving "little function, big consequences" energy, so let's go 🌸

πŸ’« NAME πŸ’«

nng_aio_result β€” go get the result of your asynchronous operation, queen πŸ‘‘

πŸŽ€ SYNOPSIS πŸŽ€

#include <nng/nng.h>

int nng_aio_result(nng_aio *aio);

πŸ¦‹ DESCRIPTION πŸ¦‹

so nng_aio_result() hands you back the result of whatever operation is attached to the handle aio. if the operation went off without a hitch, you get 0. slay. ✨ if it didn't, you get a non-zero error code instead, and that's your sign to go read up on what went wrong πŸ’…

note, and this one matters fr fr β€” the return value from this function is undefined if the operation hasn't completed yet. like, undefined undefined. 😭 so either call it from inside the handle's completion callback, or wait for the operation to finish with nng_aio_wait() first. do not just raw-dog this call and hope for the best, bestie, that's not the vibe πŸ™ˆ

🌈 RETURN VALUES 🌈

the result of the operation: either zero on success, or an error number on failure. that's it, that's the whole thing 🫢

πŸ’€ ERRORS πŸ’€

  • NNG_ETIMEDOUT β€” the operation timed out ⏰
  • NNG_ECANCELED β€” the operation was canceled 🚫

and lowkey there are various other return values possible depending on which operation you were running, so don't assume this is the full guest list πŸ‘‘

πŸ‘‘ SEE ALSO πŸ‘‘

nng_aio_abort(3), nng_aio_alloc(3), nng_aio_wait(3), nng_strerror(3), nng_aio(5), nng(7)


and that's a wrap on NNG_AIO_RESULT(3), a page from the NNG Reference Manual, dated 2026-06-30 πŸŽ€ go check your completion callback before you call this, ily, mwah πŸ’–πŸ§šβ­

πŸ“¦ where this page comes from