nip2pDestroyStream

int32_t nip2pDestroyStream (nip2p_tStreamHandle streamHandle);

Purpose

Unlinks the writer and reader and purges data from the stream. Any existing data in the writer is lost. If a stream is enabled, this function disables the stream without flushing the writer before unlinking the reader and writer. To guarantee all existing data in the writer is flushed to the reader before disabling the stream, use the nip2pFlushAndDisableStream function.

Parameters

Input
Name Type Description
streamHandle nip2p_tStreamHandle Specifies the stream to destroy.

Return Value

Name Type Description
Error code int32_t Returns the error code for the session or execution thread.

Value Meaning
0 No error.
Positive Values Warning, but the operation succeeded.
Negative Values An error occurred and the operation did not succeed.