Attempts to write up to
buffer.length bytes from
buffer to this, as with
Note that since this method never blocks, you cannot actually use
cancellable to cancel it. However, it will return an error if
cancellable has already been cancelled when you call, which may happen if you call this method after a source triggers due to
having been cancelled.
Also note that if g_io_error_would_block is returned some underlying transports like D/TLS require that you
re-send the same
buffer.length in the next write call.
a buffer to write data from
a Cancellable, or null
the number of bytes you want to write
the number of bytes written, or -1 on error (including g_io_error_would_block).