aboutsummaryrefslogtreecommitdiff
path: root/src/core/pipe.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-13 22:19:20 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-13 22:19:20 -0700
commitf7463b4bd9b549a152b28aff959113b9ab56959a (patch)
tree6f7e58b85a1c7a7ce1082d5a04068ee7272fda16 /src/core/pipe.h
parentd3de15eb854b88844071685f13cb70064d1fda49 (diff)
downloadnng-f7463b4bd9b549a152b28aff959113b9ab56959a.tar.gz
nng-f7463b4bd9b549a152b28aff959113b9ab56959a.tar.bz2
nng-f7463b4bd9b549a152b28aff959113b9ab56959a.zip
Use the same pipe teardown in all circumstances.
Diffstat (limited to 'src/core/pipe.h')
-rw-r--r--src/core/pipe.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/pipe.h b/src/core/pipe.h
index 8fba2c52..2f56e788 100644
--- a/src/core/pipe.h
+++ b/src/core/pipe.h
@@ -50,11 +50,12 @@ extern uint32_t nni_pipe_id(nni_pipe *);
// operations against will return NNG_ECLOSED.
extern void nni_pipe_close(nni_pipe *);
-// nni_pipe_remove is called by the protocol when it is done with the socket.
-// The pipe should already be closed; it will be unregistered and it's
-// resources released back to the system. The protocol MUST not reference
-// the pipe after this.
-extern void nni_pipe_remove(nni_pipe *);
+// nni_pipe_stop is called to begin the process of tearing down the socket.
+// This function runs asynchronously, and takes care to ensure that no
+// other consumers are referencing the pipe. We assume that either the
+// socket (protocol code) or endpoint may have references to the pipe
+// when this function is called. The pipe cleanup is asynchronous and
+// make take a while depending on scheduling, etc.
extern void nni_pipe_stop(nni_pipe *);
// Used only by the socket core - as we don't wish to expose the details