diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-03-19 12:33:15 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-03-19 12:33:15 -0700 |
| commit | 351ae4c98f65e5cbc71c27d6ab6410fb6228ca54 (patch) | |
| tree | 930c6be2f797c60afc3a109614f1c8e307510454 /src/core/socket.h | |
| parent | 034e20abd05f17194727060e16a5adde571053ba (diff) | |
| download | nng-351ae4c98f65e5cbc71c27d6ab6410fb6228ca54.tar.gz nng-351ae4c98f65e5cbc71c27d6ab6410fb6228ca54.tar.bz2 nng-351ae4c98f65e5cbc71c27d6ab6410fb6228ca54.zip | |
Reduce socket/pipe private data coupling.
Diffstat (limited to 'src/core/socket.h')
| -rw-r--r-- | src/core/socket.h | 6 |
1 files changed, 4 insertions, 2 deletions
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 |
