Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant