From 9ca901c1b70b17d851426483d9f54611cfa8e395 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 19 Mar 2018 16:02:37 -0700 Subject: 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. --- src/core/protocol.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/protocol.h') diff --git a/src/core/protocol.h b/src/core/protocol.h index 47ddfd3f..e0e0e0d7 100644 --- a/src/core/protocol.h +++ b/src/core/protocol.h @@ -49,6 +49,7 @@ struct nni_proto_pipe_ops { struct nni_proto_sock_option { const char *pso_name; + int pso_type; int (*pso_getopt)(void *, void *, size_t *); int (*pso_setopt)(void *, const void *, size_t); }; -- cgit v1.2.3-70-g09d2