Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

s22.Xmpp Status_Chaged event not working for C# #13

Open
VickyS1993 opened this issue Sep 24, 2018 · 0 comments
Open

s22.Xmpp Status_Chaged event not working for C# #13

VickyS1993 opened this issue Sep 24, 2018 · 0 comments

Comments

@VickyS1993
Copy link

VickyS1993 commented Sep 24, 2018

Hi,

we have been using s22.xmpp in our VSIX (visual studio extensibility tool) for the past 2 yrs. We are in a situation to automatically notify end user if there is an unfortunate connection broke or server down etc..,

we are trying to make use of,

  • StatusChanged
  • OnPresence

events but nothing helped,

Code what we have tried:

using (var client = new XmppClient("server"))
               {
                   client.Connect();

                   if (client.Connected == true)
                   {
                       client.Authenticate("userid","password");

                       client.StatusChanged += Client_StatusChanged;
                       Console.WriteLine("Connected as " + client.Jid);
                   }                    
               }
private static void Client_StatusChanged(object sender, S22.Xmpp.Im.StatusEventArgs e)
        {
            Console.Write(e.Status.Availability);
        }

Status changed event is not firing when we close the session on the server, it works for the first time if we have more than one session for same users. but we would like to notify with roaster to the client whenever connection state gets changed.

kindly help us with valid solutions, thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant