nip2pCreateAndLinkStream

int32_t nip2pCreateAndLinkStream (nip2p_tEndpointHandle writerEndpointHandle, nip2p_tEndpointHandle readerEndpointHandle, uint_8 enableStream, nip2p_tStreamHandle* streamHandle);

Purpose

Links a writer and reader and creates a stream between them.

Parameters

Input
Name Type Description
writerEndpointHandle nip2p_tEndpointHandle Identifies the handle to the writer endpoint resource.
readerEndpointHandle nip2p_tEndpointHandle Identifies the handle to the reader endpoint resource.
enableStream uint_8 Enables the stream after linking the endpoints if this parameter is set to a nonzero value. If this parameter is set to 0, the endpoints are linked, but the stream is not enabled.
Output
streamHandle nip2p_tStreamHandle* Returns the public handle to the newly created stream session if it was created successfully. Returns 0 if the stream was not created successfully.

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.