'\" t .\" Title: nng_aio .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.23 .\" Date: 2025-02-02 .\" Manual: NNG Reference Manual .\" Source: \ \& .\" Language: English .\" .TH "NNG_AIO" "5" "2025-02-02" "\ \&" "NNG Reference Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" nng_aio \- asynchronous I/O handle .SH "SYNOPSIS" .sp .if n .RS 4 .nf .fam C #include <nng/nng.h> typedef struct nng_aio nng_aio; .fam .fi .if n .RE .SH "DESCRIPTION" .sp An \f(CRnng_aio\fP is an opaque structure used in conjunction with asynchronous I/O operations. Every asynchronous operation uses one of these structures, each of which can only be used with a single operation at a time. .sp Asynchronous operations are performed without blocking calling application threads. Instead the application registers a callback function to be executed when the operation is complete (whether successfully or not). This callback will be executed exactly once. .sp The asynchronous I/O framework also supports cancellation of operations that are already in progress (see \f(CRnng_aio_cancel()\fP), as well setting a maximum timeout for them to complete within (see \f(CRnng_aio_set_timeout()\fP). .sp It is also possible to initiate an asynchronous operation, and wait for it to complete using \f(CRnng_aio_wait()\fP. .sp These structures are created using the \f(CRnng_aio_alloc()\fP, and destroyed using \f(CRnng_aio_free()\fP. .SH "SEE ALSO" .sp nng_aio_abort(3), nng_aio_alloc(3), nng_aio_cancel(3), nng_aio_count(3), nng_aio_free(3), nng_aio_get_input(3), nng_aio_get_msg(3), nng_aio_get_output(3), nng_aio_result(3), nng_aio_set_input(3), nng_aio_set_iov(3), nng_aio_set_msg(3), nng_aio_set_timeout(3), nng_aio_stop(3), nng_aio_wait(3), nng_strerror(3), nng_aio(5), nng(7)