aboutsummaryrefslogtreecommitdiff
path: root/src/core/pipe.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-08-12 12:24:54 -0700
committerGarrett D'Amore <garrett@damore.org>2017-08-14 13:43:02 -0700
commit343417234aa3fd86e8ae0b56ae500a1ed3411cfc (patch)
tree728992cfe8c2987d5939026a1f734dcc58b3df18 /src/core/pipe.h
parent4fb81f024e5f32a186cd5538574f8e5796980e36 (diff)
downloadnng-343417234aa3fd86e8ae0b56ae500a1ed3411cfc.tar.gz
nng-343417234aa3fd86e8ae0b56ae500a1ed3411cfc.tar.bz2
nng-343417234aa3fd86e8ae0b56ae500a1ed3411cfc.zip
fixes #62 Endpoint close should be synchronous #62
fixes #66 Make pipe and endpoint structures private This changes a number of things, refactoring endpoints and supporting code to keep their internals private, and making endpoint close synchronous. This will allow us to add a consumer facing API for nng_ep_close(), as well as property APIs, etc. While here a bunch of convoluted and dead code was cleaned up.
Diffstat (limited to 'src/core/pipe.h')
-rw-r--r--src/core/pipe.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/core/pipe.h b/src/core/pipe.h
index 40871062..9436d650 100644
--- a/src/core/pipe.h
+++ b/src/core/pipe.h
@@ -19,25 +19,6 @@
#include "core/thread.h"
#include "core/transport.h"
-struct nni_pipe {
- uint32_t p_id;
- nni_tran_pipe p_tran_ops;
- void * p_tran_data;
- void * p_proto_data;
- nni_cb p_proto_dtor;
- nni_list_node p_sock_node;
- nni_list_node p_ep_node;
- nni_sock * p_sock;
- nni_ep * p_ep;
- int p_reap;
- int p_stop;
- int p_refcnt;
- nni_mtx p_mtx;
- nni_cv p_cv;
- nni_list_node p_reap_node;
- nni_aio p_start_aio;
-};
-
extern int nni_pipe_sys_init(void);
extern void nni_pipe_sys_fini(void);
@@ -81,6 +62,7 @@ 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.
extern void *nni_pipe_get_proto_data(nni_pipe *);
+extern void nni_pipe_set_proto_data(nni_pipe *, void *);
// nni_pipe_sock_list_init initializes a list of pipes, to be used by
// a per-socket list.