summaryrefslogtreecommitdiff
path: root/src/core/endpt.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-22 17:38:46 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-22 17:38:46 -0800
commit89c847f1f52969ee2ae6ed35018eef40366ca061 (patch)
treeba3f3c2da64e4a74c69d315b2198df59bcd4441b /src/core/endpt.h
parent934c1316ae47754a2e368c65228c3cbfe552680f (diff)
downloadnng-89c847f1f52969ee2ae6ed35018eef40366ca061.tar.gz
nng-89c847f1f52969ee2ae6ed35018eef40366ca061.tar.bz2
nng-89c847f1f52969ee2ae6ed35018eef40366ca061.zip
Work on endpoints. More C99 & type cleanups.
Diffstat (limited to 'src/core/endpt.h')
-rw-r--r--src/core/endpt.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/core/endpt.h b/src/core/endpt.h
index 0fa69678..4054a997 100644
--- a/src/core/endpt.h
+++ b/src/core/endpt.h
@@ -12,27 +12,28 @@
#include "core/transport.h"
-// NB: This structure is supplied here for use by the CORE. Use of this library
-// OUSIDE of the core is STRICTLY VERBOTEN. NO DIRECT ACCESS BY PROTOCOLS OR
-// TRANSPORTS.
+// NB: This structure is supplied here for use by the CORE. Use of this
+// OUSIDE of the core is STRICTLY VERBOTEN. NO DIRECT ACCESS BY PROTOCOLS
+// OR TRANSPORTS.
struct nng_endpt {
struct nni_endpt_ops ep_ops;
- void * ep_tran;
- nni_list_node_t ep_sock_node;
+ void * ep_data; // Transport private
+ nni_list_node ep_sock_node; // Per socket list
nni_socket * ep_sock;
- const char * ep_addr;
- nni_thread_t ep_dialer;
- nni_thread_t ep_listener;
+ char ep_addr[NNG_MAXADDRLEN];
+ nni_thread * ep_dialer;
+ nni_thread * ep_listener;
int ep_close;
nni_mutex ep_mx;
nni_cond ep_cv;
+ nni_list ep_pipes; // Active list of pipes
};
-int nni_endpt_create(nni_endpt **, nni_socket *, const char *);
-void nni_endpt_destroy(nni_endpt *);
-int nni_endpt_dial(nni_endpt *, nni_pipe **);
-int nni_endpt_listen(nni_endpt *);
-int nni_endpt_accept(nni_endpt *, nni_pipe **);
-int nni_endpt_close(nni_endpt *);
+extern int nni_endpt_create(nni_endpt **, nni_socket *, const char *);
+extern void nni_endpt_destroy(nni_endpt *);
+extern int nni_endpt_dial(nni_endpt *, nni_pipe **);
+extern int nni_endpt_listen(nni_endpt *);
+extern int nni_endpt_accept(nni_endpt *, nni_pipe **);
+extern void nni_endpt_close(nni_endpt *);
#endif // CORE_ENDPT_H