nanomsg next generation NNG  
Home GitHub Documentation

This documentation is for version v1.2.2 of nng, but the latest released version is v1.8.0. see the documentation for v1.8.0 for the most up-to-date information.
nng_stream_free(3str)

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.

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.
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.

NNG Reference Manual vv1.2.2 © 2019 Staysail Systems, Inc, © 2018 Capitar IT Group BV
This document is supplied under the MIT License.
nanomsg™ and nng™ are trademarks of Garrett D'Amore.