Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
roymanish1982 #1
Member since Mar 2011 · 20 posts
Group memberships: Members
Show profile · Link to this post
Subject: Information related to Presence , Presence Manager , Auth ,  xmppClient_OnIq and xmppClient_OnLogin
Hi,

I have some query related to Chat functionality using MatriX SDK.

1. what is the purpose of Presence and Presence Manager and Presence ? how one should handle presence in server side and client side?
 How this Request is fired from Client every time a new request for Roster is made to the server ?
 Is is to check each roster Presence status from Server or for any other Reason ?
my client is sending below information to server.
</iq><presence xmlns="jabber:client">
  <show>chat</show>
  <status>ready for chat</status>
  <priority>1</priority>
</presence>

 
2. What is the Functionality of AuthIq or Auth . Is is for to Check the valied UserName and Password ?

3. What is the Event xmppClient_OnIq and xmppClient_OnLogin is for and when this event will be raised?
xmppClient_OnIq always fire when we request for AuthIq . so if the server returns Error in Type in case of Invalid credentails thats means that the current chat client user is not valid or so ?

            AuthIq auth = new AuthIq(IqType.get);
            auth.Auth.Password = txtPassword.Text;
            auth.Auth.Username = txtUsername.Text;
            xmppClient.IqFilter.SendIq(auth, AutResponse);




Thanks
Avatar
roymanish1982 #2
Member since Mar 2011 · 20 posts
Group memberships: Members
Show profile · Link to this post
hi,

can any one pls help me out.
Avatar
Alex #3
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #1
Quote by roymanish1982 on 2011-05-12, 16:14:
1305206071

on the server side you handle incoming Presence packets in the OnPresence event.

Quote by roymanish1982 on 2011-05-12, 16:14:
1305206071

yes, but this is old jabber style. Today and to be compatible with the RFC you MUST use SASL authentication.

Quote by roymanish1982 on 2011-05-12, 16:14:
1305206071

The OnIq event gets raised on every incoming Iq stanza.
The OnLogin event gets raised when you are authenticated to the server.

Please read and understand the XMPP RFCs for writing a server. Unlike other technical documents there are very well written, easy to understand and include tons of examples. They describe every single step.
http://xmpp.org/rfcs/rfc6120.html
http://xmpp.org/rfcs/rfc6121.html

Alex
Avatar
roymanish1982 #4
Member since Mar 2011 · 20 posts
Group memberships: Members
Show profile · Link to this post
Thanks Alex.

I have gone through the links u have suggested.

on the server side you handle incoming Presence packets in the OnPresence event.

my issue is that i want to display all the  Roster status and  Show in Roster list. how will server update the clients that the
status of a contact is changed ...

Please help me ... i am able to route the message form one client to othere .. and the is the pending task in my sprint .. if you can help we i can give the basic demo .... please help me.
Avatar
Alex #5
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
What you are looking for is described here in detail: http://xmpp.org/rfcs/rfc6121.html#presence-initial-outbound

When the server gets a presence from a client it broadcast the presence to all subscribed contacts (subscription == from || both)

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: