Creates a SocketSource that triggers when this can
be read, or cancellable
is triggered or an error occurs.
The callback on the source is of the PollableSourceFunc type.
As with is_readable, it is possible that the stream may not actually be readable even after the source triggers, so you should use read_nonblocking rather than read from the callback.
this | |
cancellable |
a Cancellable, or null |
a new SocketSource |