Table of Contents
quanser.communications.stream.flush
Flushes the stream buffer to the underlying communication channel.
would_block = stream.flush;
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
quanser.communications.stream.listen or
quanser.communications.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
quanser.communications.stream.listen or
quanser.communications.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
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 quanser.communications.stream.connect or accept.
would_block
Whether the function would have blocked. Always false for blocking streams.
stream.flush; % 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.