diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-29 16:30:31 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-29 17:36:46 -0800 |
| commit | aabe3ed301081aacce11408749c26b6baae3faaa (patch) | |
| tree | c7e72e15c94221d0326204513fb666e6a7bd45a1 /src/core/aio.h | |
| parent | 60ff324b1e6e5124dbbfefec732940512ed40f87 (diff) | |
| download | nng-aabe3ed301081aacce11408749c26b6baae3faaa.tar.gz nng-aabe3ed301081aacce11408749c26b6baae3faaa.tar.bz2 nng-aabe3ed301081aacce11408749c26b6baae3faaa.zip | |
udp: use a bounce buffer if we lack sendmsg or recvmsg
This includes checks to determine if those functions are present,
and a test case to verify that scatter gather with UDP works.
Diffstat (limited to 'src/core/aio.h')
| -rw-r--r-- | src/core/aio.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/aio.h b/src/core/aio.h index 5c74691d..cbf2c919 100644 --- a/src/core/aio.h +++ b/src/core/aio.h @@ -194,6 +194,8 @@ extern void nni_aio_sys_fini(void); typedef struct nni_aio_expire_q nni_aio_expire_q; +#define NNI_AIO_MAX_IOV 8 + // nng_aio is an async I/O handle. The details of this aio structure // are private to the AIO framework. The structure has the public name // (nng_aio) so that we minimize the pollution in the public API namespace. @@ -216,7 +218,7 @@ struct nng_aio { nni_task a_task; // Read/write operations. - nni_iov a_iov[8]; + nni_iov a_iov[NNI_AIO_MAX_IOV]; unsigned a_nio; // Message operations. |
