PollableOutputStream.writevNonblocking

Attempts to write the bytes contained in the n_vectors vectors to stream, as with gio.output_stream.OutputStream.writev. If stream is not currently writable, this will immediately return %G_POLLABLE_RETURN_WOULD_BLOCK, and you can use gio.pollable_output_stream.PollableOutputStream.createSource to create a #GSource that will be triggered when stream is writable. error will *not* be set in that case.

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 gio.types.PollableReturn.WouldBlock is returned some underlying transports like D/TLS require that you re-send the same vectors and n_vectors in the next write call.

The behaviour of this method is undefined if gio.pollable_output_stream.PollableOutputStream.canPoll returns false for stream.

interface PollableOutputStream
writevNonblocking

Parameters

vectors gio.types.OutputVector[]

the buffer containing the #GOutputVectors to write.

bytesWritten size_t

location to store the number of bytes that were written to the stream

cancellable gio.cancellable.Cancellable

a #GCancellable, or null

Return Value

Type: gio.types.PollableReturn

%G_POLLABLE_RETURN_OK on success, gio.types.PollableReturn.WouldBlock if the stream is not currently writable (and error is *not* set), or gio.types.PollableReturn.Failed if there was an error in which case error will be set.