Table of Contents
stream_flush
Flushes the stream buffer to the underlying communication channel.
would_block = stream_flush(stream);
This function flushes the stream buffer. It attempts to send the contents of the buffer over the communication channel. If an error occurs, then it issues an error message. If the connection is closed it is considered an error condition.
If
stream_listen or
stream_connect was called with the non-blocking flag set to false
(0), then this function blocks
until all the data in the buffer is sent.
If
stream_listen or
stream_connect was called with the non-blocking flag set to true
(1), then this function does not
block. It attempts to send all the data remaining in the stream buffer. However, if this operation would block then it returns would_block
as true
(1), even if it has already sent some of the data. In this case, the
stream_poll function may be used with the 'flush' flag to determine when at least one more byte may be flushed.
stream
Stream handle returned by stream_connect or stream_accept.
would_block
Whether the function would have blocked. Always false for blocking streams.
stream_flush(stream); % Flushes the stream buffer to the underlying communication channel.
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.