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/nng.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nng.h') diff --git a/src/nng.h b/src/nng.h index 48a04ae1..aac7ec89 100644 --- a/src/nng.h +++ b/src/nng.h @@ -75,6 +75,10 @@ NNG_DECL void nng_fini(void); // pipes associated with the socket. NNG_DECL int nng_close(nng_socket); +// nng_closeall closes all open sockets. Do not call this from +// a library; it will affect all sockets. +NNG_DECL void nng_closeall(void); + // nng_shutdown shuts down the socket. This causes any threads doing // work for the socket or blocked in socket functions to be woken (and // return NNG_ECLOSED). The socket resources are still present, so it -- cgit v1.2.3-70-g09d2