Tries to write buffer.length bytes to stream, as with
write_all, but using
pollable_stream_write rather than
write.
On a successful write of buffer.length bytes, true is returned, and
bytes_written is set to buffer.length.
If there is an error during the operation (including g_io_error_would_block in the
non-blocking case), false is returned and throws is set to
indicate the error status, bytes_written is updated to contain the number of bytes written into the stream before the error
occurred.
As with pollable_stream_write, if 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.
| stream |
a OutputStream. |
| buffer |
the buffer containing the data to write. |
| blocking |
whether to do blocking I/O |
| bytes_written |
location to store the number of bytes that was written to the stream |
| cancellable |
optional Cancellable object, null to ignore. |
| count |
the number of bytes to write |
|
true on success, false if there was an error |