Subject: XMPPClient when Reconnect - onpresence, onrosteritem is not fired
Hi,
I am trying to reconnect to XMPPClient, after it is closed.
The new session is opened and the onlogin callback method is called, but the onpresence, onrosteritem event is not fired. The following is the function I used to reconnect.
Please help...
Thanks & Regards
Babu
I am trying to reconnect to XMPPClient, after it is closed.
The new session is opened and the onlogin callback method is called, but the onpresence, onrosteritem event is not fired. The following is the function I used to reconnect.
- public void Login(LoginInfo _LoginInfo, UserProfile _UserProfile, bool _Relogin = false)
- {
- try
- {
- this.LoginInfo = _LoginInfo;
- this.UserProfile = _UserProfile;
- Util.LoggedInClient.Transport = Matrix.Net.Transport.Bosh;
- if (!_Relogin)
- else
- Util.LoggedInClient.OnPresence += new System.EventHandler<PresenceEventArgs>(xmppClient_OnPresence);
- Util.LoggedInClient.OnAuthError += new EventHandler<Matrix.Xmpp.Sasl.SaslEventArgs>(LoggedInClient_OnAuthError);
- Util.LoggedInClient.SetUsername(this.LoginInfo.UserId);
- Util.LoggedInClient.SetXmppDomain(Util.ChatDomain);
- Util.LoggedInClient.Password = this.LoginInfo.Password;
- Util.LoggedInClient.Status = "Online";
- Util.LoggedInClient.Show = Matrix.Xmpp.Show.Chat;
- Util.LoggedInClient.Open();
- }
- catch (Exception ex)
- {
- }
- }
Please help...
Thanks & Regards
Babu
This post was edited 2 times, last on 2016-08-19, 17:15 by Alex.