Method

GioSocketClientconnect_to_uri_async

since: 2.26

Declaration [src]

void
g_socket_client_connect_to_uri_async (
  GSocketClient* client,
  const gchar* uri,
  guint16 default_port,
  GCancellable* cancellable,
  GAsyncReadyCallback callback,
  gpointer user_data
)

Description [src]

This is the asynchronous version of g_socket_client_connect_to_uri().

When the operation is finished callback will be called. You can then call g_socket_client_connect_to_uri_finish() to get the result of the operation.

Available since: 2.26

This method completes asynchronously. Use g_socket_client_connect_to_uri_finish() inside the GAsyncReadyCallback to obtain the result of the operation.

Parameters

uri

Type: const gchar*

A network uri.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
default_port

Type: guint16

The default port to connect to.

cancellable

Type: GCancellable

A GCancellable, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
callback

Type: GAsyncReadyCallback

A GAsyncReadyCallback.

The argument can be NULL.
user_data

Type: gpointer

User data for the callback.

The argument can be NULL.
The data is owned by the caller of the method.