From efa702387fcfa80ddd02e1a85f73c5b6f6ba1955 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 28 Nov 2021 09:05:30 -0800 Subject: fixes #1536 nng_sendmsg and nng_recvmsg could be faster fixes #1535 Desire nng_ctx_sendmsg and nng_ctx_recvmsg --- include/nng/nng.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/nng/nng.h b/include/nng/nng.h index cd75495a..a7c184ba 100644 --- a/include/nng/nng.h +++ b/include/nng/nng.h @@ -49,8 +49,8 @@ extern "C" { // We use SemVer, and these versions are about the API, and // may not necessarily match the ABI versions. #define NNG_MAJOR_VERSION 1 -#define NNG_MINOR_VERSION 5 -#define NNG_PATCH_VERSION 2 +#define NNG_MINOR_VERSION 6 +#define NNG_PATCH_VERSION 0 #define NNG_RELEASE_SUFFIX "" // if non-empty, this is a pre-release // Maximum length of a socket address. This includes the terminating NUL. @@ -421,10 +421,20 @@ NNG_DECL int nng_ctx_id(nng_ctx); // uses a local context instead of the socket global context. NNG_DECL void nng_ctx_recv(nng_ctx, nng_aio *); +// nng_ctx_recvmsg is allows for receiving a message synchronously using +// a context. It has the same semantics as nng_recvmsg, but operates +// on a context instead of a socket. +NNG_DECL int nng_ctx_recvmsg(nng_ctx, nng_msg **, int); + // nng_ctx_send sends asynchronously. It works like nng_send_aio, but // uses a local context instead of the socket global context. NNG_DECL void nng_ctx_send(nng_ctx, nng_aio *); +// nng_ctx_sendmsg is allows for sending a message synchronously using +// a context. It has the same semantics as nng_sendmsg, but operates +// on a context instead of a socket. +NNG_DECL int nng_ctx_sendmsg(nng_ctx, nng_msg *, int); + NNG_DECL int nng_ctx_get(nng_ctx, const char *, void *, size_t *); NNG_DECL int nng_ctx_get_bool(nng_ctx, const char *, bool *); NNG_DECL int nng_ctx_get_int(nng_ctx, const char *, int *); -- cgit v1.2.3-70-g09d2