From c72bd53e2c5b4bc7207bfa1710ccff47655a099a Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 20 Aug 2018 11:09:23 -0700 Subject: fixes #506 AIO "providers" need a way to call nni_aio_schedule. --- src/nng.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/nng.c') 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) -- cgit v1.2.3-70-g09d2