connectToHost

open fun connectToHost(hostAndPort: String, defaultPort: <Error class: unknown class>, cancellable: Cancellable? = null): <Error class: unknown class><SocketConnection>

This is a helper function for g_socket_client_connect().

Attempts to create a TCP connection to the named host.

Return

a #GSocketConnection on success, null on error.

Since

2.22

Parameters

hostAndPort

the name and optionally port of the host to connect to

defaultPort

the default port to connect to

cancellable

a #GCancellable, or null