glooxd  0.3-svn
glooxd API Documentation


Client-2-Server connections
Roster Management
Basic Server
Known Issues and Shortcomings


The design of glooxd closely follows the design of its underlying library, gloox, and tries to re-use as much as possible from it.

Amongst others, the design features:

Client-2-Server connections

Client-2-Server connections are handled by C2S instances. You need at least one C2S instance, which can handle as many domains as you like.


When a client connects, it will be able to use SASL PLAIN only for authentication (for now). Use the AuthenticationHandler to check the credentials supplied by the client.

Roster Management

There is no Roster Management by means of XMPP implemented yet. However, by using the RosterProvider , you can send a custom roster to clients.

Basic Server

To set up a basic server, use code similar to this:

ConfigManager cm( m_log );
// Do not add domains just yet. They are pushed to components
// only once, so add them when all components are in place.
Router r( cm, m_log );
SM sm( r, cm, m_log, this );
sm.addPlugin( new RosterManager( sm, r, this ) );
sm.addPlugin( new PresenceManager( sm, r, this ) );
sm.addPlugin( new MessageManager( sm, r, this ) );
sm.addPlugin( new VCardManager( sm, r ) );
sm.addPlugin( new DiscoManager( sm, r ) );
C2S c2s( r, cm, m_log, sm );
c2s.registerStreamFeature( new FeatureSTARTTLS( true, this ) );
c2s.registerStreamFeature( new FeatureSASL( this ) );
c2s.registerStreamFeature( new FeatureCompression() );
c2s.registerStreamFeature( new FeatureResourceBind( sm ) );
c2s.registerStreamFeature( new FeatureSession() );
// It's ok to add domains and interfaces now.
cm.addC2SInterface( gloox::EmptyString, 6222 );
cm.bindDomain( "", gloox::EmptyString, 6222 );

Known Issues and Shortcomings