Gio.SocketClient.prototype.connect_to_host_async
function connect_to_host_async(host_and_port: String, default_port: Number(guint16), cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback): void { // Gjs wrapper for g_socket_client_connect_to_host_async() }
This is the asynchronous version of Gio.SocketClient.prototype.connect_to_host.
When the operation is finished callback will be called. You can then call Gio.SocketClient.prototype.connect_to_host_finish to get the result of the operation.
Since 2.22
- host_and_port
the name and optionally the port of the host to connect to
- default_port
the default port to connect to
- cancellable
a Gio.Cancellable, or null
- callback