#include <oskit/io/ttystream.h>OSKIT_COMDECL flush(oskit_ttystream_t *tty, int queue_selector);
This method discards any buffered output data that has not yet been transmitted, and/or any buffered input data that has not yet been read, depending on the queue_selector parameter. This method corresponds to the POSIX tcflush function; see the POSIX standard for details.
- tty
- The TTY stream object to flush.
- queue_selector
- Must be one of the following:
- OSKIT_TCIFLUSH
- Flush the input buffer.
- OSKIT_TCOFLUSH
- Flush the output buffer.
- OSKIT_TCIOFLUSH
- Flush the input and output buffers.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.