From 89c847f1f52969ee2ae6ed35018eef40366ca061 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 22 Dec 2016 17:38:46 -0800 Subject: Work on endpoints. More C99 & type cleanups. --- src/core/endpt.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src/core/endpt.h') 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 -- cgit v1.2.3-70-g09d2