From 351ae4c98f65e5cbc71c27d6ab6410fb6228ca54 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 19 Mar 2017 12:33:15 -0700 Subject: Reduce socket/pipe private data coupling. --- src/core/socket.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core/socket.h') diff --git a/src/core/socket.h b/src/core/socket.h index a746a170..21449dc9 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -87,11 +87,13 @@ extern nni_notify *nni_sock_notify(nni_sock *, int, nng_notify_func, void *); extern void nni_sock_unnotify(nni_sock *, nni_notify *); // nni_sock_pipe_add is called by the pipe to register the pipe with -// with the socket. The pipe is added to the idle list. -extern void nni_sock_pipe_add(nni_sock *, nni_pipe *); +// with the socket. The pipe is added to the idle list. The protocol +// private pipe data is initialized as well. +extern int nni_sock_pipe_add(nni_sock *, nni_pipe *); // nni_sock_pipe_rem deregisters the pipe from the socket. The socket // will block during close if there are registered pipes outstanding. +// This also frees any protocol private pipe data. extern void nni_sock_pipe_rem(nni_sock *, nni_pipe *); // nni_sock_pipe_ready lets the socket know the pipe is ready for -- cgit v1.2.3-70-g09d2