Method

XemeConnectionconnect_async

since: 0.1

Declaration [src]

void
xeme_connection_connect_async (
  XemeConnection* connection,
  XemeInputStream* input,
  GProxyResolver* resolver,
  GCancellable* cancellable,
  GAsyncReadyCallback callback,
  gpointer data
)

Description [src]

Starts the connection process.

If XemeConnection:server is not NULL, then this will try to connect directly to that server on the port specified by XemeConnection:port.

If XemeConnection:server is NULL then DNS SRV records will be used to connect per RFC 6120.

If XemeConnection:tls-mode is set to direct-tls, then the _xmpps-client service will be queried. If the DNS SRV lookup does not return a record, an attempt will be made to connect directly to the domain part of XemeConnection:jid on the port specified by XemeConnection:port.

If XemeConnection:tls-mode is set to starttls or none then the _xmpp-client service will be queried. If the DNS SRV lookup does not return a record, an attempt will be made to connect directly to the domain part of XemeConnection:jid on the port specified by XemeConnection:port.

If XemeConnection:tls-mode is set to starttls then the connection will attempt to upgrade to TLS during the connection process. If this fails, the connection will be terminated.

Available since: 0.1

Parameters

input

Type: XemeInputStream

The XemeInputStream to use.

The data is owned by the caller of the function.
resolver

Type: GProxyResolver

An optional proxy resolver.

The argument can be NULL.
The instance takes ownership of the data, and is responsible for freeing it.
cancellable

Type: GCancellable

An optional cancellable.

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

Type: GAsyncReadyCallback

A callback function.

The argument can be NULL.
data

Type: gpointer

User data pass to callback.

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