Method
XemeConnectionconnect_async
unstable 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 set, then this will try to connect
directly to that server on the port specified by XemeConnection:port.
If XemeConnection:server is not set 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
This method completes asynchronously. Use xeme_connection_connect_finish() inside the GAsyncReadyCallback to obtain the result of the operation.
Parameters
input-
Type:
XemeInputStreamThe input stream.
The data is owned by the caller of the method. resolver-
Type:
GProxyResolverAn optional proxy resolver.
The argument can be NULL.The instance takes ownership of the data, and is responsible for freeing it. cancellable-
Type:
GCancellableAn optional cancellable.
The argument can be NULL.The data is owned by the caller of the method. callback-
Type:
GAsyncReadyCallbackThe callback function.
The argument can be NULL. data-
Type:
gpointerUser data pass to the callback.
The argument can be NULL.The data is owned by the caller of the method.