diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-21 21:41:41 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-21 21:41:41 -0800 |
| commit | 99a78ade3a6034784e40d5dfa70cc72aa09021ca (patch) | |
| tree | a1ebe245333e8e52832b647e0f70637b3326ad11 /src/core/options.h | |
| parent | 423c776ad9b8a68196bb4d9acfbfd5b7b9c4edc6 (diff) | |
| download | nng-99a78ade3a6034784e40d5dfa70cc72aa09021ca.tar.gz nng-99a78ade3a6034784e40d5dfa70cc72aa09021ca.tar.bz2 nng-99a78ade3a6034784e40d5dfa70cc72aa09021ca.zip | |
Adds NNG_OPT_SENDFD and NNG_OPT_RECVFD socket options (untested).
Diffstat (limited to 'src/core/options.h')
| -rw-r--r-- | src/core/options.h | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
