Next step is to register modules providing support for features you would like to use. Almost in any case you will need at least following modules:
StreamFeaturesModule
Responsible for handling XMPP stream features
AuthModule
and SaslModule
AuthModule
add common authentication features, while SaslModule
add support for SASL based authentication.
ResourceBinderModule
Module responsible for resource binding which is part of stream negotiation process.
SessionEstablishmentModule
Module handles session establishment which is last step of stream negotiation, however it is not needed according to RFC 6120. We recommend to register this module for compatibility reasons - if it will be not needed then it will not be used.
To register, ie. StreamFeaturesModule
you need to use following code:
client.modulesManager.register(StreamFeaturesModule());