Connects to XMPP server.
The function returns the following error codes:
E_INVALID if host, jid, or password are empty, or port is invalid.E_IO if the connection attempt failed.E_NULL if the XMPP context is not associated.E_XMPP if a connection context could not be created.| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(im_type), | intent(inout) | :: | im |
IM context type. |
||
| character(len=*), | intent(in) | :: | host |
XMPP server (IP address or FQDN). |
||
| integer, | intent(in) | :: | port |
XMPP server port. |
||
| character(len=*), | intent(in) | :: | jid |
IM ID (JID). |
||
| character(len=*), | intent(in) | :: | password |
JID account password. |
||
| procedure(dm_im_connection_callback) | :: | callback |
IM connection handler. |
|||
| type(c_ptr), | intent(in), | optional | :: | user_data |
C pointer to user data. |
|
| character(len=*), | intent(in), | optional | :: | resource |
Optional resource ( |
|
| logical, | intent(in), | optional | :: | keep_alive |
Enable TCP Keep Alive. |
|
| logical, | intent(in), | optional | :: | tls_required |
TLS is mandatory. |
|
| logical, | intent(in), | optional | :: | tls_trusted |
Trust TLS certificate. |