Top | ![]() |
![]() |
![]() |
![]() |
InfCertificateCredentials * | credentials | Read / Write / Construct |
char * | local-hostname | Read / Write / Construct Only |
InfSaslContext * | sasl-context | Read / Write / Construct |
char * | sasl-mechanisms | Read / Write / Construct |
InfXmppConnectionSecurityPolicy | security-policy | Read / Write / Construct |
InfdTcpServer * | tcp-server | Read / Write / Construct Only |
InfdXmppServer * infd_xmpp_server_new (InfdTcpServer *tcp
,InfXmppConnectionSecurityPolicy policy
,InfCertificateCredentials *creds
,InfSaslContext *sasl_context
,const gchar *sasl_mechanisms
);
Creates a new InfdXmppServer with tcp
as underlaying TCP server object.
No attempt is being made to open tcp
, if it is not already open. When a
new connection comes in, the XMPP server creates a XMPP connection that
may be used to communicate with the client. Note however that the
resulting connection will be in status OPENING until authentication has
completed.
If policy
is INF_XMPP_CONNECTION_SECURITY_ONLY_UNSECURED
, then creds
may
be NULL
. If creds
is non-NULL
nevertheless, then it is possible to change
the security policy later using infd_xmpp_server_set_security_policy()
.
creds
can also be changed later while the server is running. So just set
valid credentials before changing policy
to allow TLS.
If sasl_context
is NULL
, the server uses a built-in context that only
supports ANONYMOUS authentication. If sasl_context
is not NULL
, then
sasl_mechanisms
specifies the mechanisms offered to clients. If
sasl_mechanisms
is NULL
, then all available mechanims will be offered.
If sasl_context
is NULL
, then this parameter is ignored.
[constructor]
void infd_xmpp_server_set_security_policy (InfdXmppServer *server
,InfXmppConnectionSecurityPolicy policy
);
Sets the security policy for newly accepted InfXmppConnections. Does not already established connections.
InfXmppConnectionSecurityPolicy
infd_xmpp_server_get_security_policy (InfdXmppServer *server
);
Returns the current security policy for newly accepted InfXmppConnections.
“credentials”
property“credentials” InfCertificateCredentials *
The certificate credentials for GnuTLS.
Owner: InfdXmppServer
Flags: Read / Write / Construct
“local-hostname”
property “local-hostname” char *
Hostname of the server.
Owner: InfdXmppServer
Flags: Read / Write / Construct Only
Default value: NULL
“sasl-context”
property“sasl-context” InfSaslContext *
The SASL context used for authentaction.
Owner: InfdXmppServer
Flags: Read / Write / Construct
“sasl-mechanisms”
property “sasl-mechanisms” char *
The SASL mechanisms offered to the client for authentication.
Owner: InfdXmppServer
Flags: Read / Write / Construct
Default value: NULL
“security-policy”
property“security-policy” InfXmppConnectionSecurityPolicy
Whether to offer or require TLS.
Owner: InfdXmppServer
Flags: Read / Write / Construct
Default value: INF_XMPP_CONNECTION_SECURITY_ONLY_UNSECURED
“tcp-server”
property“tcp-server” InfdTcpServer *
Underlaying TCP server.
Owner: InfdXmppServer
Flags: Read / Write / Construct Only
“error”
signalvoid user_function (InfdXmppServer *infdxmppserver, GError *arg1, gpointer user_data)
Flags: Run Last