[gio.types.IOErrorEnum.WouldBlock]).
PollableOutputStream.writeNonblocking
ptrdiff_t writeNonblocking(ubyte[] buffer, gio.cancellable.Cancellable cancellable = null)Attempts to write up to count bytes from buffer to stream, as with [gio.output_stream.OutputStream.write]. If stream is not currently writable, this will immediately return [gio.types.IOErrorEnum.WouldBlock], and you can use [gio.pollable_output_stream.PollableOutputStream.createSource] to create a #GSource that will be triggered when stream is writable.
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.IOErrorEnum.WouldBlock] is returned some underlying transports like D/TLS require that you re-send the same buffer and count in the next write call.
The behaviour of this method is undefined if [gio.pollable_output_stream.PollableOutputStream.canPoll] returns false for stream.
Parameters
buffer | a buffer to write data from |
cancellable | a #GCancellable, or null |