int co_stream_eos(co_stream stream);
This function checks if a stream is at an end-of-stream condition. This function must be called from within a process run function.
The argument for co_stream_eos is as follows:
Returns an integer value: 0 if no end-of-stream is detected, and 1 if there is an end-of-stream.
When co_stream_eos returns 1 (true), subsequent calls to co_stream_eos continue to return 1 until the reader closes the stream.