From cb4fe7294f7da2ad1a2fdf896748b42e1a8115ab Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 24 Dec 2016 15:08:24 -0800 Subject: Getopt implemented (and minimal test). --- src/nng.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nng.c') diff --git a/src/nng.c b/src/nng.c index fc57c037..225bf074 100644 --- a/src/nng.c +++ b/src/nng.c @@ -83,6 +83,18 @@ nng_setopt(nng_socket *s, int opt, const void *val, size_t sz) } +int +nng_getopt(nng_socket *s, int opt, void *val, size_t *szp) +{ + int rv; + + if ((rv == nni_init()) != 0) { + return (rv); + } + return (nni_socket_getopt(s, opt, val, szp)); +} + + // Misc. const char * nng_strerror(int num) -- cgit v1.2.3-70-g09d2