pollableStreamWrite

Tries to write to stream, as with g_output_stream_write() (if blocking is TRUE) or g_pollable_output_stream_write_nonblocking() (if blocking is FALSE). This can be used to more easily share code between blocking and non-blocking implementations of a method. If blocking is FALSE, then stream must be a GPollableOutputStream for which g_pollable_output_stream_can_poll() returns TRUE or else the behavior is undefined. If blocking is TRUE, then stream does not need to be a GPollableOutputStream. Since 2.34

static
pollableStreamWrite

Parameters

stream OutputStream

a GOutputStream.

buffer void[]

the buffer containing the data to write. [array length=count][element-type guint8]

blocking int

whether to do blocking I/O

cancellable Cancellable

optional GCancellable object, NULL to ignore. [allow-none]

Return Value

Type: gssize

the number of bytes written, or -1 on error.

Throws

GException on failure.

Meta