Gio.SocketConnection.prototype.connect

function connect(address: Gio.SocketAddress, cancellable: Gio.Cancellable): Boolean {
    // Gjs wrapper for g_socket_connection_connect()
}
  

Connect connection to the specified remote address.

Since 2.32

address

a Gio.SocketAddress specifying the remote address.

cancellable

a %GCancellable or null

Returns

true if the connection succeeded, false on error