From 68d117eb856b42e57cc3e912496d84d7bd8002fd Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 4 Jul 2018 09:55:24 -0700 Subject: fixes #574 nng_close should indicate warning against transmit truncation --- docs/man/nng_close.3.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/man/nng_close.3.adoc b/docs/man/nng_close.3.adoc index d7a5a11d..dcad5cd4 100644 --- a/docs/man/nng_close.3.adoc +++ b/docs/man/nng_close.3.adoc @@ -34,6 +34,14 @@ in `NNG_ECLOSED`. Threads waiting for operations on the socket when this call is executed may also return with an `NNG_ECLOSED` result. +NOTE: Closing the socket while data is in transmission will likely lead to loss +of that data. +There is no automatic linger or flush to ensure that the socket send buffers +have completely transmitted. +It is recommended to wait a brief period after calling +`<>` or similar functions, before calling this +function. + == RETURN VALUES This function returns 0 on success, and non-zero otherwise. -- cgit v1.2.3-70-g09d2