aboutsummaryrefslogtreecommitdiff
path: root/src/core/pipe.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-09-20 12:11:53 -0700
committerGarrett D'Amore <garrett@damore.org>2017-09-22 12:33:50 -0700
commite236dc8141f4d00dc926fbfba7739dabf96ebcdd (patch)
tree3c88190966eac4d888008d5076e7edd1817f64a2 /src/core/pipe.h
parentf04cfd27e2d67b0fc89b079410fc11b55b6d1979 (diff)
downloadnng-e236dc8141f4d00dc926fbfba7739dabf96ebcdd.tar.gz
nng-e236dc8141f4d00dc926fbfba7739dabf96ebcdd.tar.bz2
nng-e236dc8141f4d00dc926fbfba7739dabf96ebcdd.zip
More pipe option handling, pipe API support. Url option.
This fleshes most of the pipe API out, making it available to end user code. It also adds a URL option that is independent of the address options (which would be sockaddrs.) Also, we are now setting the pipe for req/rep. The other protocols need to have the same logic added to set the receive pipe on the message. (Pair is already done.)
Diffstat (limited to 'src/core/pipe.h')
-rw-r--r--src/core/pipe.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/pipe.h b/src/core/pipe.h
index 9436d650..bb55a8cd 100644
--- a/src/core/pipe.h
+++ b/src/core/pipe.h
@@ -57,7 +57,7 @@ extern void nni_pipe_start(nni_pipe *);
extern uint16_t nni_pipe_proto(nni_pipe *);
extern uint16_t nni_pipe_peer(nni_pipe *);
-extern int nni_pipe_getopt(nni_pipe *, int, void *, size_t *sizep);
+extern int nni_pipe_getopt(nni_pipe *, int, void *, size_t *sizep);
// nni_pipe_get_proto_data gets the protocol private data set with the
// nni_pipe_set_proto_data function. No locking is performed.
@@ -72,4 +72,11 @@ extern void nni_pipe_sock_list_init(nni_list *);
// a per-endpoint list.
extern void nni_pipe_ep_list_init(nni_list *);
+// nni_pipe_find finds a pipe given its ID. It places a hold on the
+// pipe, which must be released by the caller when it is done.
+extern int nni_pipe_find(nni_pipe **, uint32_t);
+
+// nni_pipe_rele releases the hold on the pipe placed by nni_pipe_find.
+extern void nni_pipe_rele(nni_pipe *);
+
#endif // CORE_PIPE_H