From 3b73756a5e5d075adfd03f5c49014094428d818f Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 24 Dec 2016 15:54:44 -0800 Subject: Change in handling of extended info for messages. Instead of supplying a pipe, and expecting that the info there would be included we use nng_msg_getopt(). This will be enabled by the app asking for extended information by setting an option, we don't copy the data for every app (most won't care). This means we don't have to worry about reference counting the pipe for the life of associated messages. --- src/core/socket.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/socket.c') diff --git a/src/core/socket.c b/src/core/socket.c index adf2e082..9db61838 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -557,6 +557,7 @@ nni_setopt_duration(nni_duration *ptr, const void *val, size_t size) return (0); } + static int nni_getopt_duration(nni_duration *ptr, void *val, size_t *sizep) { @@ -570,6 +571,7 @@ nni_getopt_duration(nni_duration *ptr, void *val, size_t *sizep) return (0); } + int nni_socket_setopt(nni_socket *sock, int opt, const void *val, size_t size) { @@ -606,6 +608,7 @@ nni_socket_setopt(nni_socket *sock, int opt, const void *val, size_t size) return (rv); } + int nni_socket_getopt(nni_socket *sock, int opt, void *val, size_t *sizep) { @@ -641,5 +644,3 @@ nni_socket_getopt(nni_socket *sock, int opt, void *val, size_t *sizep) nni_mutex_exit(&sock->s_mx); return (rv); } - - -- cgit v1.2.3-70-g09d2