aboutsummaryrefslogtreecommitdiff
path: root/src/nng.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nng.c')
-rw-r--r--src/nng.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/nng.c b/src/nng.c
index ec221fb7..723b230e 100644
--- a/src/nng.c
+++ b/src/nng.c
@@ -144,6 +144,36 @@ nng_getopt(nng_socket *s, int opt, void *val, size_t *szp)
}
+nng_notify *
+nng_setnotify(nng_socket *sock, int mask, nng_notify_func fn, void *arg)
+{
+ NNI_INIT_VOID();
+ return (nni_add_notify(sock, mask, fn, arg));
+}
+
+
+void
+nng_unsetnotify(nng_socket *sock, nng_notify *notify)
+{
+ NNI_INIT_VOID();
+ nni_rem_notify(sock, notify);
+}
+
+
+nng_socket *
+nng_event_socket(nng_event *ev)
+{
+ return (ev->e_sock);
+}
+
+
+int
+nng_event_type(nng_event *ev)
+{
+ return (ev->e_type);
+}
+
+
// Misc.
const char *
nng_strerror(int num)