[ Version ( since = "2.34" ) ]
public ssize_t pollable_stream_write (OutputStream stream, uint8 buffer, bool blocking, Cancellable? cancellable = null) throws Error
This can be used to more easily share code between blocking and non-blocking implementations of a method.
blocking is false, then
stream must be a
PollableOutputStream for which
can_poll returns true
or else the behavior is undefined. If
blocking is true, then
stream does not need to
be a PollableOutputStream.
the buffer containing the data to write.
whether to do blocking I/O
optional Cancellable object, null to ignore.
the number of bytes to write
the number of bytes written, or -1 on error.