diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-07-07 00:08:24 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-07-07 00:08:24 -0700 |
| commit | 3730260da3744b549aaa1fe13946a674f924f63c (patch) | |
| tree | 902866876ee71246a299370cbe8f6580d758525c /src/core/endpt.h | |
| parent | 3b19940dfcd5d3585b1fb1dcf7915a748ae67289 (diff) | |
| download | nng-3730260da3744b549aaa1fe13946a674f924f63c.tar.gz nng-3730260da3744b549aaa1fe13946a674f924f63c.tar.bz2 nng-3730260da3744b549aaa1fe13946a674f924f63c.zip | |
TCP asynchronous working now.
It turns out that I had to fix a number of subtle asynchronous
handling bugs, but now TCP is fully asynchronous. We need to
change the high-level dial and listen interfaces to be async
as well.
Some of the transport APIs have changed here, and I've elected
to change what we expose to consumers as endpoints into seperate
dialers and listeners. Under the hood they are the same, but
it turns out that its helpful to know the intended use of the
endpoint at initialization time.
Scalability still occasionally hangs on Linux. Investigation
pending.
Diffstat (limited to 'src/core/endpt.h')
| -rw-r--r-- | src/core/endpt.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/endpt.h b/src/core/endpt.h index 3d353cdf..becaa3f4 100644 --- a/src/core/endpt.h +++ b/src/core/endpt.h @@ -28,6 +28,7 @@ struct nni_ep { char ep_addr[NNG_MAXADDRLEN]; nni_thr ep_thr; int ep_mode; + int ep_started; int ep_closed; // full shutdown int ep_bound; // true if we bound locally nni_mtx ep_mtx; @@ -36,7 +37,6 @@ struct nni_ep { nni_list ep_pipes; }; -#define NNI_EP_MODE_IDLE 0 #define NNI_EP_MODE_DIAL 1 #define NNI_EP_MODE_LISTEN 2 @@ -46,7 +46,7 @@ extern int nni_ep_find(nni_ep **, uint32_t); extern void nni_ep_hold(nni_ep *); 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_create(nni_ep **, nni_sock *, const char *, int); extern void nni_ep_stop(nni_ep *); extern void nni_ep_close(nni_ep *); extern void nni_ep_remove(nni_ep *); |
