diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-09 19:05:28 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-09 19:05:28 -0700 |
| commit | 9feb54e9c7ab116ba566086a76604338f86e3bc3 (patch) | |
| tree | fb8f2aeaef74db92f02377d6e1045f5237b694a7 /src/core/socket.h | |
| parent | 052dad14137e60c24e6bf6e4551d7009bdeb19e9 (diff) | |
| download | nng-9feb54e9c7ab116ba566086a76604338f86e3bc3.tar.gz nng-9feb54e9c7ab116ba566086a76604338f86e3bc3.tar.bz2 nng-9feb54e9c7ab116ba566086a76604338f86e3bc3.zip | |
fixes #47 compat_reqttls fails sometimes
fixes #23 Restore the old idhash logic for sockets
Diffstat (limited to 'src/core/socket.h')
| -rw-r--r-- | src/core/socket.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/core/socket.h b/src/core/socket.h index 6824b04b..76ebca12 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -15,41 +15,39 @@ // OUSIDE of the core is STRICTLY VERBOTEN. NO DIRECT ACCESS BY PROTOCOLS OR // TRANSPORTS. struct nni_socket { - nni_mtx s_mx; - nni_cv s_cv; + nni_list_node s_node; + nni_mtx s_mx; + nni_cv s_cv; + nni_cv s_close_cv; uint32_t s_id; + uint32_t s_flags; + unsigned s_refcnt; // protected by global lock + void * s_data; // Protocol private nni_msgq *s_uwq; // Upper write queue nni_msgq *s_urq; // Upper read queue - nni_list_node s_node; - nni_proto_id s_self_id; nni_proto_id s_peer_id; - uint32_t s_flags; - nni_proto_pipe_ops s_pipe_ops; nni_proto_sock_ops s_sock_ops; - void *s_data; // Protocol private - // XXX: options nni_duration s_linger; // linger time nni_duration s_sndtimeo; // send timeout nni_duration s_rcvtimeo; // receive timeout nni_duration s_reconn; // reconnect time nni_duration s_reconnmax; // max reconnect time + size_t s_rcvmaxsz; // maximum receive size nni_list s_eps; // active endpoints nni_list s_pipes; // active pipes - size_t s_rcvmaxsz; // maximum receive size - int s_ep_pend; // EP dial/listen in progress int s_closing; // Socket is closing - int s_closed; // Socket closed + int s_closed; // Socket closed, protected by global lock int s_besteffort; // Best effort mode delivery int s_senderr; // Protocol state machine use int s_recverr; // Protocol state machine use @@ -59,8 +57,6 @@ struct nni_socket { nni_notifyfd s_send_fd; nni_notifyfd s_recv_fd; - - uint32_t s_nextid; // Next Pipe ID. }; extern int nni_sock_sys_init(void); |
