aboutsummaryrefslogtreecommitdiff
path: root/src/core/nng_impl.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-11 18:50:50 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-11 18:50:50 -0800
commit877588b7448b2da2c6079c87528404e1f712e3e9 (patch)
tree7024fcff2d247efb1c98108ec65a6f7ac352ddf8 /src/core/nng_impl.h
parentf6e715fb640ef72b30cbcc0d1882ef81115e96d8 (diff)
downloadnng-877588b7448b2da2c6079c87528404e1f712e3e9.tar.gz
nng-877588b7448b2da2c6079c87528404e1f712e3e9.tar.bz2
nng-877588b7448b2da2c6079c87528404e1f712e3e9.zip
Add operations on msgqueues.
Diffstat (limited to 'src/core/nng_impl.h')
-rw-r--r--src/core/nng_impl.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/nng_impl.h b/src/core/nng_impl.h
index a62ac101..683e0df1 100644
--- a/src/core/nng_impl.h
+++ b/src/core/nng_impl.h
@@ -80,9 +80,6 @@ extern int nni_msgqueue_create(nni_msgqueue_t *, int);
*/
extern void nni_msgqueue_destroy(nni_msgqueue_t);
-extern int nni_msgqueue_len(nni_msgqueue_t);
-extern int nni_msgqueue_cap(nni_msgqueue_t);
-
/*
* nni_msgqueue_put attempts to put a message to the queue. It will wait
* for the timeout (us), if the value is positive. If the value is negative
@@ -102,4 +99,11 @@ extern int nni_msgqueue_put(nni_msgqueue_t, nng_msg_t, int);
*/
extern int nni_msgqueue_get(nni_msgqueue_t, nng_msg_t *, int);
+/*
+ * nni_msgqueue_close closes the queue. After this all operates on the
+ * message queue will return NNG_ECLOSED. Messages inside the queue
+ * are freed. Unlike closing a go channel, this operation is idempotent.
+ */
+extern void nni_msgqueue_close(nni_msgqueue_t);
+
#endif /* NNG_IMPL_H */