nip2pFlushAndDisableStream

int32_t nip2pFlushAndDisableStream (nip2p_t StreamHandle streamHandle, int32_t flushTimeoutMsec, uint8_t* flushTimedOut);

Purpose

Immediately flushes data from the writer and disables the stream. Flushing the writer prevents the writer from accepting new data and sends all existing data in the writer to the stream. If you do not want to flush the writer before disabling the stream, use the nip2pDisableStream function.

Parameters

Input
Name Type Description
streamHandle nip2p_tStreamHandle Specifies the stream to disable.
flushTimeoutMsec int32_t Specifies the maximum amout of time to wait, in milliseconds, for the stream event. If this parameter is set to -1, the operation waits indefinitely for the event.
Output
flushTimedOut uint8_t* Returns whether the flush operation timed out. A value of NULL means that the timeout is ignored and that the operation waits indefinitely for the event.

Value Meaning
0 No timeout occurred.
Nonzero values Flush operation timed out.

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.