spio_t_error_code user_flush_output( void *user_data, spio_t_bits flush_options );
This is the prototype for one of the methods of user defined streams. It is used when SICStus wants to write data to the user defined stream.
The same value as was passed to
The following bits can be set:
If this is set, the function should return quickly or with
user_flush_output will never block, you can ignore this value.
You should return
cannot support non-blocking flush.
On success, all buffered data should have been written and
SPIO_S_NOERR or some other success code returned.
On failure, return a SPIO error code. Error codes with special meaning
Returned if it is not possible to write more data onto the stream, e.g. some underlying device has been closed.
SPIO_DEVICE_FLUSH_OPTION_NONBLOCKING was set but the operation
Some unsupported option, e.g.
SPIO_DEVICE_FLUSH_OPTION_NONBLOCKING, was passed.
Other error codes may also be returned.
Should ensure that any buffered data is transmitted to its
destination. Can be passed as
cpg-ref-SP_create_stream. Defining a New Stream.