From 50532054c0bee3a1ff3324db10f3cdf7b44041e4 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 8 Aug 2017 00:33:19 -0700 Subject: Added nn_compat code for option handling, fixed other bugs. Hop counts for REQ were busted (bad TTL), and imported the compat_reqtll test. At the same time, added code to nn_term to shut down completely, discarding sockets. (Note that some things, such as globals, may still be left around; that's ok.) --- src/core/socket.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/socket.h') diff --git a/src/core/socket.h b/src/core/socket.h index 41dfbc33..54c1b4da 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -23,6 +23,8 @@ struct nni_socket { nni_msgq *s_uwq; // Upper write queue nni_msgq *s_urq; // Upper read queue + nni_list_node s_node; + uint16_t s_protocol; uint16_t s_peer; uint32_t s_flags; @@ -67,6 +69,7 @@ extern int nni_sock_find(nni_sock **, uint32_t); extern void nni_sock_rele(nni_sock *); extern int nni_sock_open(nni_sock **, uint16_t); extern void nni_sock_close(nni_sock *); +extern void nni_sock_closeall(void); extern int nni_sock_shutdown(nni_sock *); extern uint16_t nni_sock_proto(nni_sock *); extern uint16_t nni_sock_peer(nni_sock *); -- cgit v1.2.3-70-g09d2