connect

open fun connect(connectable: SocketConnectable, cancellable: Cancellable? = null): <Error class: unknown class><SocketConnection>

Tries to resolve the @connectable and make a network connection to it.

Upon a successful connection, a new #GSocketConnection is constructed and returned. The caller owns this new object and must drop their reference to it when finished with it.

The type of the #GSocketConnection object returned depends on the type of the underlying socket that is used. For instance, for a TCP/IP connection it will be a #GTcpConnection.

The socket created will be the same family as the address that the

Return

a #GSocketConnection on success, null on error.

Since

2.22

Parameters

connectable

a #GSocketConnectable specifying the remote address.

cancellable

optional #GCancellable object, null to ignore.