Infinityd.XmppServer

g GObject.GInterface GObject.GInterface Infinityd.XmlServer Infinityd.XmlServer GObject.GInterface->Infinityd.XmlServer GObject.Object GObject.Object Infinityd.XmppServer Infinityd.XmppServer GObject.Object->Infinityd.XmppServer Infinityd.XmlServer->Infinityd.XmppServer

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Infinityd.XmlServer (2)

Structs:

GObject.ObjectClass (5)

class

new (tcp, policy, creds, sasl_context, sasl_mechanisms)

get_security_policy ()

set_security_policy (policy)

Virtual Methods

Inherited:

GObject.Object (7), Infinityd.XmlServer (2)

do_error (error)

Properties

Inherited:

Infinityd.XmlServer (1)

Name

Type

Flags

Short Description

credentials

Infinity.CertificateCredentials

r/w/c

The certificate credentials for GnuTLS

local-hostname

str

r/w/co

Hostname of the server

sasl-context

Infinity.SaslContext

r/w/c

The SASL context used for authentaction

sasl-mechanisms

str

r/w/c

The SASL mechanisms offered to the client for authentication

security-policy

Infinity.XmppConnectionSecurityPolicy

r/w/c

Whether to offer or require TLS

tcp-server

Infinityd.TcpServer

r/w/co

Underlaying TCP server

Signals

Inherited:

GObject.Object (1), Infinityd.XmlServer (1)

Name

Short Description

error

Fields

Inherited:

GObject.Object (1), Infinityd.XmlServer (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Infinityd.XmppServer(**kwargs)
Bases:

GObject.Object, Infinityd.XmlServer

Abstract:

No

Structure:

Infinityd.XmppServerClass

classmethod new(tcp, policy, creds, sasl_context, sasl_mechanisms)
Parameters:
Returns:

A new Infinityd.XmppServer.

Return type:

Infinityd.XmppServer

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 be None. If creds is non-None nevertheless, then it is possible to change the security policy later using Infinityd.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 not None, then sasl_mechanisms specifies the mechanisms offered to clients. If sasl_mechanisms is None, then all available mechanims will be offered. If sasl_context is None, then this parameter is ignored.

get_security_policy()
Returns:

The current security policy.

Return type:

Infinity.XmppConnectionSecurityPolicy

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:

RUN_LAST

Parameters:

Property Details

Infinityd.XmppServer.props.credentials
Name:

credentials

Type:

Infinity.CertificateCredentials

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The certificate credentials for GnuTLS

Infinityd.XmppServer.props.local_hostname
Name:

local-hostname

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Hostname of the server

Infinityd.XmppServer.props.sasl_context
Name:

sasl-context

Type:

Infinity.SaslContext

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The SASL context used for authentaction

Infinityd.XmppServer.props.sasl_mechanisms
Name:

sasl-mechanisms

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The SASL mechanisms offered to the client for authentication

Infinityd.XmppServer.props.security_policy
Name:

security-policy

Type:

Infinity.XmppConnectionSecurityPolicy

Default Value:

Infinity.XmppConnectionSecurityPolicy.ONLY_UNSECURED

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether to offer or require TLS

Infinityd.XmppServer.props.tcp_server
Name:

tcp-server

Type:

Infinityd.TcpServer

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Underlaying TCP server