summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2021-11-28 09:05:30 -0800
committerGarrett D'Amore <garrett@damore.org>2021-11-28 18:13:21 -0800
commitefa702387fcfa80ddd02e1a85f73c5b6f6ba1955 (patch)
tree853d84a55f7b4f9c1c100a82443520a258cec9d8 /include
parent774e9375153d8a48bd1cbf654ca323656551b054 (diff)
downloadnng-efa702387fcfa80ddd02e1a85f73c5b6f6ba1955.tar.gz
nng-efa702387fcfa80ddd02e1a85f73c5b6f6ba1955.tar.bz2
nng-efa702387fcfa80ddd02e1a85f73c5b6f6ba1955.zip
fixes #1536 nng_sendmsg and nng_recvmsg could be faster
fixes #1535 Desire nng_ctx_sendmsg and nng_ctx_recvmsg
Diffstat (limited to 'include')
-rw-r--r--include/nng/nng.h14
1 files changed, 12 insertions, 2 deletions
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 *);