aboutsummaryrefslogtreecommitdiff
path: root/src/core/endpt.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-03-19 16:02:37 -0700
committerGarrett D'Amore <garrett@damore.org>2018-03-20 09:53:58 -0700
commit9ca901c1b70b17d851426483d9f54611cfa8e395 (patch)
treea26b11e16f505ccdc77b5ac6681e0f9de705ff20 /src/core/endpt.h
parent9b886a9999247d87c9f6d389c3e65a4bd39be010 (diff)
downloadnng-9ca901c1b70b17d851426483d9f54611cfa8e395.tar.gz
nng-9ca901c1b70b17d851426483d9f54611cfa8e395.tar.bz2
nng-9ca901c1b70b17d851426483d9f54611cfa8e395.zip
fixes #296 Typed options should validate option type
fixes #302 nng_dialer/listener/pipe_getopt_sockaddr desired This adds plumbing to pass and check the type of options all the way through. NNG_ZT_OPT_ORBIT is type UINT64, but you can use the untyped form to pass two of them if needed. No typed access for retrieving strings yet. I think this should allocate a pointer and copy that out, but that's for later.
Diffstat (limited to 'src/core/endpt.h')
-rw-r--r--src/core/endpt.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/endpt.h b/src/core/endpt.h
index df4f345b..f08c7bf2 100644
--- a/src/core/endpt.h
+++ b/src/core/endpt.h
@@ -27,9 +27,10 @@ extern void nni_ep_close(nni_ep *);
extern int nni_ep_dial(nni_ep *, int);
extern int nni_ep_listen(nni_ep *, int);
extern void nni_ep_list_init(nni_list *);
-extern int nni_ep_setopt(nni_ep *, const char *, const void *, size_t);
-extern int nni_ep_getopt(nni_ep *, const char *, void *, size_t *);
-extern int nni_ep_pipe_add(nni_ep *ep, nni_pipe *);
+extern int nni_ep_setopt(nni_ep *, const char *, const void *, size_t, int);
+extern int nni_ep_getopt(nni_ep *, const char *, void *, size_t *, int);
+extern int nni_ep_opttype(nni_ep *, const char *, int *);
+extern int nni_ep_pipe_add(nni_ep *ep, nni_pipe *);
extern void nni_ep_pipe_remove(nni_ep *, nni_pipe *);
extern int nni_ep_mode(nni_ep *);