Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
Tertitten #1
Member since Mar 2009 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: Checking if user gets disconnected
Hi, I would like to add the status of a user when it changes to the chat window TextBox, however I can't really figure out how to do it...

I tought something like this would do the trick:
        public void PresenceChanged(agsXMPP.protocol.client.Presence state)
        {
            if (state.Type == PresenceType.unavailable)
                rtfChat.AppendText("User offline");
        }
But that did nothing, can someone please help out ?
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this looks correct.
can you post the code which calls the PresenceChanged function?

Alex
Avatar
[gja] #3
Member since Jul 2009 · 19 posts
Group memberships: Members
Show profile · Link to this post
Subject: same problem with this one
how will i know if i am disconnected to the openfire server?..and notify me if i am disconnected..pls help me how to do this.


thanks,
glen
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
when you get disconnected the you should get the OnClose or one of the OnError... events.

Alex
Avatar
[gja] #5
Member since Jul 2009 · 19 posts
Group memberships: Members
Show profile · Link to this post
Subject: Check online user
hello guys,

i know this is very basic to you.but for me that just started the xmpp.i just a little confused on how to do this..

i have button named 'btnCheck' and a textbox named 'txtaddress'.i inputed the textbox an adress(e.g 1234@domain) and after clicking btncheck.this will check if 1234@domain address is online/offline..how will i do this..can u give me simple code snippet?..

many thanks..
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
pleasy study our MiniClient example. There is all you need.

If you want to learn XMPP is suggest XMPP: The Definitive Guide

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS