From 99a78ade3a6034784e40d5dfa70cc72aa09021ca Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 21 Jan 2017 21:41:41 -0800 Subject: Adds NNG_OPT_SENDFD and NNG_OPT_RECVFD socket options (untested). --- src/core/options.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core/options.h') diff --git a/src/core/options.h b/src/core/options.h index 84d958c1..6c46173f 100644 --- a/src/core/options.h +++ b/src/core/options.h @@ -10,6 +10,12 @@ #ifndef CORE_OPTIONS_H #define CORE_OPTIONS_H +struct nni_notifyfd { + int sn_wfd; // written to in order to flag an event + int sn_rfd; // read from in order to clear an event + int sn_init; +}; + // Option helpers. These can be called from protocols or transports // in their own option handling, centralizing the logic for dealing with // variable sized options. @@ -37,4 +43,7 @@ extern int nni_setopt_int(int *, const void *, size_t, int, int); // nni_getopt_int gets an integer. extern int nni_getopt_int(int *, void *, size_t *); +// nni_getopt_fd obtains a notification file descriptor. +extern int nni_getopt_fd(nni_sock *, nni_notifyfd *, int, void *, size_t *); + #endif // CORE_OPTIONS_H -- cgit v1.2.3-70-g09d2