Configure the writer and reader. Refer to the hardware API documentation for information about configuring a writer or reader.
Obtain the references to the writer and reader using methods associated with the hardware API.
Set the writer and reader references to the writerEndPointHandle and readerEndpointHandle inputs of the nip2pCreateAndLinkStream function. This function associates the writer and reader with the stream. After this function runs, the stream is in a Disabled or Enabled state depending on the value of enableStream.
(Optional) Use the nip2pEnableStream
function to enable the stream. You do not need to use this function if you set the enableStream input of the nip2pCreateAndLinkStream function to 1.
In C, you can monitor peer-to-peer stream events such as overflow, underflow, and stream state by either waiting for a specific event to occur or by polling the status attribute.
To wait for a specific event, call the nip2pWaitForStreamEvent function. This function waits for a specific event to occur, or for the timeout to expire, before returning.