Function

Gio-2.0Giopollable_stream_readSince 2.34

  • Tries to read from stream, as with g_input_stream_read() (if blocking is true) or g_pollable_input_stream_read_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 Gio.PollableInputStream for which g_pollable_input_stream_can_poll() returns true, or else the behavior is undefined. If blocking is true, then stream does not need to be a Gio.PollableInputStream.

    Parameters

    Returns number

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

    2.34