NNG_AIO_RESULT(3)
β¨ 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
- 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