From 4250fc119057eb6a6b534e9c0758488cc5fb034e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 24 Oct 2017 15:26:14 -0700 Subject: fixes #132 Implement saner notification for file descriptors This eliminates the "quasi-functional" notify API altogether. The aio framework will be coming soon to replace it. As a bonus, apps (legacy apps) that use the notification FDs will see improved performance, since we don't have to context switch to give them a notification. --- src/nng.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'src/nng.c') diff --git a/src/nng.c b/src/nng.c index d66c0dcb..9fc99dc3 100644 --- a/src/nng.c +++ b/src/nng.c @@ -611,48 +611,6 @@ nng_getopt_ms(nng_socket sid, const char *name, nng_duration *valp) return (nng_getopt(sid, name, valp, &sz)); } -nng_notify * -nng_setnotify(nng_socket sid, int mask, nng_notify_func fn, void *arg) -{ - nni_sock * sock; - nng_notify *notify; - int rv; - - if ((rv = nni_sock_find(&sock, sid)) != 0) { - return (NULL); - } - notify = nni_sock_notify(sock, mask, fn, arg); - nni_sock_rele(sock); - return (notify); -} - -void -nng_unsetnotify(nng_socket sid, nng_notify *notify) -{ - nni_sock *sock; - int rv; - - if ((rv = nni_sock_find(&sock, sid)) != 0) { - return; - } - nni_sock_unnotify(sock, notify); - nni_sock_rele(sock); -} - -nng_socket -nng_event_socket(nng_event *ev) -{ - // XXX: FOR NOW.... maybe evnet should contain socket Id - // instead? - return (nni_sock_id(ev->e_sock)); -} - -int -nng_event_type(nng_event *ev) -{ - return (ev->e_type); -} - int nng_device(nng_socket s1, nng_socket s2) { -- cgit v1.2.3-70-g09d2