initConnection();
if(eventAdapter != null)
connection.addEventListener(eventAdapter);
session = new XmppSession(connection, true);
disco = new ServiceDiscovery(session);
new XmppPushRoster(session);
XmppUserSettings userSetting;
if(sasl)
userSetting = new XmppUserSettings(host,port,domain, user, pass, XmppUserSettings.SASL);
else
userSetting = new XmppUserSettings(host,port,domain, user, pass, XmppUserSettings.NON_SASL);