Create a SocketSource for this.
cancellable if not null can be used to cancel the source, which will cause the source to
trigger, reporting the current condition (which is likely 0 unless cancellation happened at the same time as a condition change). You can check
for this in the callback using is_cancelled.
This takes a reference on this until
source is destroyed.
a Cancellable or null.
the SocketSource for this or null when an error occurred. Free with g_source_unref ()