package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gio/Ocgtk_gio/Gio/Wrappers/Pollable_input_stream/index.html
Module Wrappers.Pollable_input_stream
type t = [ `pollable_input_stream ] Gobject.objval from_gobject : 'a Gobject.obj -> tval is_readable : t -> boolChecks if @stream can be read.
Note that some stream types may not be able to implement this 100% reliably, and it is possible that a call to g_input_stream_read() after this returns %TRUE would still block. To guarantee non-blocking behavior, you should always use g_pollable_input_stream_read_nonblocking(), which will return a %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
The behaviour of this method is undefined if g_pollable_input_stream_can_poll() returns %FALSE for @stream.
val can_poll : t -> boolChecks if @stream is actually pollable. Some classes may implement #GPollableInputStream but have only certain instances of that class be pollable. If this method returns %FALSE, then the behavior of other #GPollableInputStream methods is undefined.
For any given stream, the value returned by this method is constant; a stream cannot switch from pollable to non-pollable or vice versa.