stream_poke_end
Finishes a "poke" operation by updating the stream buffer pointers so that all poked data is now marked as written to the stream.
Description
This function finishes a "poke" operation by updating the stream buffer pointers so that all poked data is now marked as written to the stream. It must be called to end a poke operation.
If the status argument is one then it advances the output stream and the data is sent to the underlying output stream to make room for new data. If the status argument is less than one then the poked data is discarded.
The status argument is generally the result of the last stream_poke_xxxx operation. Refer to the stream_poke_begin function for an example.
This function assumes that the stream is valid. It does not block because it does not access the underlying communication channel.
Prototype
t_error stream_poke_end(t_stream stream, t_stream_poke_state * state, t_error status);
Parameters
t_stream stream
A client stream established using stream_connect or stream_accept.
t_stream_poke_state * state
The "poke state" indicating how much data to add to the output stream.
t_error status
This value is typically the result from the last stream_poke_xxxx operation. If it is 1 then the poke is completed and the data is sent. If it is negative then the data is not sent and the status is returned as the result.
Return value
This function returns an error if one of the parameters is invalid or the stream is shutdown or closed, or the status argument is negative. It returns one if the status argument is one and the peek is completed successfully.
Error codes
This function does not return any error code.
Requirements
Include Files |
Libraries |
---|---|
quanser_stream.h |
quanser_communications.lib;quanser_runtime.lib;quanser_common.lib |
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.