nng_stream_free(3str)
| NNG_STREAM_FREE(3str) | NNG Reference Manual | NNG_STREAM_FREE(3str) |
NAME
nng_stream_free - free byte stream
SYNOPSIS
#include <nng/nng.h> void nng_stream_free(nng_stream *s);
DESCRIPTION
The nng_stream_free() function closes the byte stream s, and frees the underlying resources associated with it.
If any operations are pending, such as nng_stream_send() or nng_stream_recv(), they will be terminated with an NNG_ECLOSED error condition.
Warning
It is important that the application ensure that no further
accesses
are made to s, as the memory backing it will be reclaimed for other
uses.
Note
Closing the connection 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.
RETURN VALUES
None.
ERRORS
None.
SEE ALSO
nng_strerror(3), nng_stream_close(3str), nng_stream_recv(3str), nng_stream_send(3str), nng_stream(5)
| 2026-05-29 |
