co_error co_stream_close(co_stream stream);
This function closes a previously opened stream. This function must be called from within a process run function.
The argument for co_stream_close is as follows:
Possible return values are listed, with values of co_errno shown in parentheses:
Closing an input stream flushes any unread data from the stream and consumes one end-of-stream token. An attempt to close an input stream that has not yet received an end-of-stream token blocks until the writer closes the stream.
Closing an output stream sets the end-of-stream condition after the last unread data packet in the buffer.