aboutsummaryrefslogtreecommitdiff
path: root/src/core/endpt.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-01-24 14:28:59 -0800
committerGarrett D'Amore <garrett@damore.org>2017-01-24 14:28:59 -0800
commit907a1eb392ca4b29c62b9cc3d2df1ad337695abf (patch)
tree27447f4cf82625023a2c4ae5fc385a51d3829685 /src/core/endpt.h
parent4c496d8182b5f3a5db6ca8fd763bab444e39f48a (diff)
downloadnng-907a1eb392ca4b29c62b9cc3d2df1ad337695abf.tar.gz
nng-907a1eb392ca4b29c62b9cc3d2df1ad337695abf.tar.bz2
nng-907a1eb392ca4b29c62b9cc3d2df1ad337695abf.zip
Add nni_ep_hold, nni_ep_hold_close, nni_ep_rele, nng_endpoint_close.
Diffstat (limited to 'src/core/endpt.h')
-rw-r--r--src/core/endpt.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/endpt.h b/src/core/endpt.h
index a3b2ce9e..493355d2 100644
--- a/src/core/endpt.h
+++ b/src/core/endpt.h
@@ -27,7 +27,9 @@ struct nni_ep {
int ep_mode;
int ep_close; // full shutdown
int ep_bound; // true if we bound locally
+ int ep_refcnt;
nni_cv ep_cv;
+ nni_cv ep_refcv;
nni_pipe * ep_pipe; // Connected pipe (dialers only)
};
@@ -35,6 +37,10 @@ struct nni_ep {
#define NNI_EP_MODE_DIAL 1
#define NNI_EP_MODE_LISTEN 2
+extern int nni_ep_hold(nni_ep **, uint32_t);
+extern int nni_ep_hold_close(nni_ep **, uint32_t);
+extern void nni_ep_rele(nni_ep *);
+extern uint32_t nni_ep_id(nni_ep *);
extern int nni_ep_create(nni_ep **, nni_sock *, const char *);
extern int nni_ep_accept(nni_ep *, nni_pipe **);
extern void nni_ep_close(nni_ep *);