Infinityd.XmppServer¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c |
The certificate credentials for GnuTLS |
||
r/w/co |
Hostname of the server |
||
r/w/c |
The SASL context used for authentaction |
||
r/w/c |
The SASL mechanisms offered to the client for authentication |
||
r/w/c |
Whether to offer or require TLS |
||
r/w/co |
Underlaying TCP server |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Infinityd.XmppServer(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(tcp, policy, creds, sasl_context, sasl_mechanisms)¶
- Parameters:
tcp (
Infinityd.TcpServer
) – AInfinityd.TcpServer
.policy (
Infinity.XmppConnectionSecurityPolicy
) – The initial security policy.creds (
Infinity.CertificateCredentials
) – Certificate credentials used to secure any communication.sasl_context (
Infinity.SaslContext
) – A SASL context used for authentication.sasl_mechanisms (
str
) – A whitespace-sparated list of SASL mechanisms.
- Returns:
A new
Infinityd.XmppServer
.- Return type:
Creates a new
Infinityd.XmppServer
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
Infinity.XmppConnectionSecurityPolicy.ONLY_UNSECURED
, then creds may beNone
. If creds is non-None
nevertheless, then it is possible to change the security policy later usingInfinityd.XmppServer.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
None
, the server uses a built-in context that only supports ANONYMOUS authentication. If sasl_context is notNone
, then sasl_mechanisms specifies the mechanisms offered to clients. If sasl_mechanisms isNone
, then all available mechanims will be offered. If sasl_context isNone
, then this parameter is ignored.
- get_security_policy()¶
- Returns:
The current security policy.
- Return type:
Returns the current security policy for newly accepted
Infinity.XmppConnection
s.
- set_security_policy(policy)¶
- Parameters:
policy (
Infinity.XmppConnectionSecurityPolicy
) – The new security policy.
Sets the security policy for newly accepted
Infinity.XmppConnection
s. Does not already established connections.
- do_error(error) virtual¶
- Parameters:
error (
GLib.Error
) –
Signal Details¶
- Infinityd.XmppServer.signals.error(xmpp_server, object)¶
- Signal Name:
error
- Flags:
- Parameters:
xmpp_server (
Infinityd.XmppServer
) – The object which received the signalobject (
GLib.Error
) –
Property Details¶
- Infinityd.XmppServer.props.credentials¶
- Name:
credentials
- Type:
- Default Value:
- Flags:
The certificate credentials for GnuTLS
- Infinityd.XmppServer.props.local_hostname¶
- Name:
local-hostname
- Type:
- Default Value:
- Flags:
Hostname of the server
- Infinityd.XmppServer.props.sasl_context¶
- Name:
sasl-context
- Type:
- Default Value:
- Flags:
The SASL context used for authentaction
- Infinityd.XmppServer.props.sasl_mechanisms¶
-
The SASL mechanisms offered to the client for authentication
- Infinityd.XmppServer.props.security_policy¶
- Name:
security-policy
- Type:
- Default Value:
- Flags:
Whether to offer or require TLS
- Infinityd.XmppServer.props.tcp_server¶
- Name:
tcp-server
- Type:
- Default Value:
- Flags:
Underlaying TCP server