aboutsummaryrefslogtreecommitdiff
path: root/src/core/endpt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/endpt.h')
-rw-r--r--src/core/endpt.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/endpt.h b/src/core/endpt.h
index 73ed3243..757d58ce 100644
--- a/src/core/endpt.h
+++ b/src/core/endpt.h
@@ -21,16 +21,18 @@ struct nng_endpt {
nni_list_node ep_node; // Per socket list
nni_socket * ep_sock;
char ep_addr[NNG_MAXADDRLEN];
- nni_thread * ep_dialer;
- nni_thread * ep_listener;
- int ep_stop; // thread exits before start
- int ep_start; // start thread running
+ nni_thr ep_thr;
+ int ep_mode;
int ep_close; // full shutdown
int ep_bound; // true if we bound locally
nni_cond ep_cv;
nni_pipe * ep_pipe; // Connected pipe (dialers only)
};
+#define NNI_EP_MODE_IDLE 0
+#define NNI_EP_MODE_DIAL 1
+#define NNI_EP_MODE_LISTEN 2
+
extern int nni_endpt_create(nni_endpt **, nni_socket *, const char *);
extern int nni_endpt_accept(nni_endpt *, nni_pipe **);
extern void nni_endpt_close(nni_endpt *);