From 29628309ae018c3f317eef9b03625d4ce3807a92 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 22 Dec 2016 21:34:49 -0800 Subject: Added lingering (1s default.) --- src/nng.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nng.h') diff --git a/src/nng.h b/src/nng.h index ccd86384..6d3296d8 100644 --- a/src/nng.h +++ b/src/nng.h @@ -346,6 +346,11 @@ NNG_DECL int nng_device(nng_socket *, nng_socket *); // This limit is built into other implementations, so do not change it. #define NNG_MAXADDRLEN (128) +// Default linger time in microseconds. The framework will wait up until +// this long for outgoing message queues to drain before closing underlying +// connections, when closing the socket itself. +#define NNG_LINGER_DEFAULT (1000000) + #ifdef __cplusplus } #endif -- cgit v1.2.3-70-g09d2