aboutsummaryrefslogtreecommitdiff
path: root/src/core/protocol.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-03-19 16:21:13 -0700
committerGarrett D'Amore <garrett@damore.org>2017-03-19 16:21:13 -0700
commitb8a133a9d6c5d8439c1f8ed3153d6a750aae3646 (patch)
tree0aed9586538b1330e836501612a66074093c32e8 /src/core/protocol.h
parent351ae4c98f65e5cbc71c27d6ab6410fb6228ca54 (diff)
downloadnng-b8a133a9d6c5d8439c1f8ed3153d6a750aae3646.tar.gz
nng-b8a133a9d6c5d8439c1f8ed3153d6a750aae3646.tar.bz2
nng-b8a133a9d6c5d8439c1f8ed3153d6a750aae3646.zip
Eliminate p_active, better names for pipe start and stop.
Diffstat (limited to 'src/core/protocol.h')
-rw-r--r--src/core/protocol.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/protocol.h b/src/core/protocol.h
index 5f7fc4c8..745f5986 100644
--- a/src/core/protocol.h
+++ b/src/core/protocol.h
@@ -31,18 +31,19 @@ struct nni_proto_pipe_ops {
// pipe threads have been stopped.
void (*pipe_fini)(void *);
- // pipe_add is called to register a pipe with the protocol. The
+ // pipe_start is called to register a pipe with the protocol. The
// protocol can reject this, for example if another pipe is already
// active on a 1:1 protocol. The protocol may not block during this,
// as the socket lock is held.
- int (*pipe_add)(void *);
+ int (*pipe_start)(void *);
- // pipe_rem is called to unregister a pipe from the protocol.
+ // pipe_stop is called to unregister a pipe from the protocol.
// Threads may still acccess data structures, so the protocol
// should not free anything yet. This is called with the socket
// lock held, so the protocol may not call back into the socket, and
- // must not block.
- void (*pipe_rem)(void *);
+ // must not block. This operation must be idempotent, and may
+ // be called even if pipe_start was not.
+ void (*pipe_stop)(void *);
};
struct nni_proto_sock_ops {