aboutsummaryrefslogtreecommitdiff
path: root/src/nng.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-08-20 11:09:23 -0700
committerGarrett D'Amore <garrett@damore.org>2018-08-20 11:09:23 -0700
commitc72bd53e2c5b4bc7207bfa1710ccff47655a099a (patch)
treef85e26882244430c41930c45d83887d5b01969cc /src/nng.c
parent6e5f6a26beec0a44d25625cacb5095cdc7a94146 (diff)
downloadnng-c72bd53e2c5b4bc7207bfa1710ccff47655a099a.tar.gz
nng-c72bd53e2c5b4bc7207bfa1710ccff47655a099a.tar.bz2
nng-c72bd53e2c5b4bc7207bfa1710ccff47655a099a.zip
fixes #506 AIO "providers" need a way to call nni_aio_schedule.
Diffstat (limited to 'src/nng.c')
-rw-r--r--src/nng.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nng.c b/src/nng.c
index f7f16954..37ee3e5f 100644
--- a/src/nng.c
+++ b/src/nng.c
@@ -1601,6 +1601,21 @@ nng_aio_finish(nng_aio *aio, int rv)
nni_aio_finish(aio, rv, nni_aio_count(aio));
}
+void
+nng_aio_defer(nng_aio *aio, nng_aio_cancelfn fn, void *arg)
+{
+ nni_aio_schedule(aio, fn, arg);
+}
+
+bool
+nng_aio_begin(nng_aio *aio)
+{
+ if (nni_aio_begin(aio) != 0) {
+ return (false);
+ }
+ return (true);
+}
+
#if 0
int
nng_snapshot_create(nng_socket sock, nng_snapshot **snapp)