module Gio::PollableInputStream

Overview

GPollableInputStream is implemented by Gio::InputStreams that can be polled for readiness to read. This can be used when interfacing with a non-GIO API that expects UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.

Some classes may implement GPollableInputStream but have only certain instances of that class be pollable. If Gio::PollableInputStream#can_poll returns false, then the behavior of other GPollableInputStream methods is undefined.

Direct including types

Defined in:

lib/gi-crystal/src/auto/gio-2.0/pollable_input_stream.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.cast(obj : GObject::Object) : self #

Cast a GObject::Object to self, throws a TypeCastError if the cast can't be made.


Class Method Detail

def self.cast?(obj : GObject::Object) : self | Nil #

def self.g_type : UInt64 #

Instance Method Detail

def can_poll : Bool #

def create_source(cancellable : Gio::Cancellable | Nil) : GLib::Source #

def is_readable : Bool #

def read_nonblocking(buffer : Bytes, cancellable : Gio::Cancellable | Nil) : Int64 #

abstract def to_unsafe #