From 7acc29013636d2ddc004acebe02d88722fe0c8db Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 25 Dec 2016 09:29:16 -0800 Subject: Expose and implement pipe operations. (nng_pipe_close, nng_pipe_getopt). --- src/core/pipe.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core/pipe.c') diff --git a/src/core/pipe.c b/src/core/pipe.c index bf2e64fe..c9cc545c 100644 --- a/src/core/pipe.c +++ b/src/core/pipe.c @@ -76,3 +76,14 @@ nni_pipe_create(nni_pipe **pp, const nni_pipe_ops *ops) p->p_id = nni_plat_nextid(); return (0); } + + +int +nni_pipe_getopt(nni_pipe *p, int opt, void *val, size_t *szp) +{ + /* This should only be called with the mutex held... */ + if (p->p_ops.p_getopt == NULL) { + return (NNG_ENOTSUP); + } + return (p->p_ops.p_getopt(p->p_data, opt, val, szp)); +} -- cgit v1.2.3-70-g09d2