SocketClient.connectAsync

void connectAsync(gio.socket_connectable.SocketConnectable connectable, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)

This is the asynchronous version of [gio.socket_client.SocketClient.connect].

You may wish to prefer the asynchronous version even in synchronous command line programs because, since 2.60, it implements

RFC 8305 "Happy Eyeballs"

recommendations to work around long connection timeouts in networks where IPv6 is broken by performing an IPv4 connection simultaneously without waiting for IPv6 to time out, which is not supported by the synchronous call. (This is not an API guarantee, and may change in the future.)

When the operation is finished callback will be called. You can then call [gio.socket_client.SocketClient.connectFinish] to get the result of the operation.

Parameters

connectablea #GSocketConnectable specifying the remote address.
cancellablea #GCancellable, or null
callbacka #GAsyncReadyCallback