Not logged in. · Lost password · Register
Forum: agsXMPP RSS
-glen- #1
Member since Sep 2009 · 16 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to send messages to multiple login clients w/ same jabber id's

   i really had fun in xmpp library,because it is very extensible..currently,i am developing a client that can multiple login with the same jabber id's.i left the resource property to, the server will assign a random resource for it.

Ex:Receiver                                                       Ex:Sender
   Login 1:smith@dbvismin2/resource1                          Login 1:john@dbvismin2/resource4
   Login 2:smith@dbvismin2/resource2                          Login 2:john@dbvismin2/resource5
   Login 3:smith@dbvismin2/resource3                          Login 3:john@dbvismin2/resource6

Now,im with this logic that if JOHN@dbvismin2/resource4 send a message to SMITH@dbvismin2/resource1 and then JOHN first checks if SMITH is not busy.if smith is busy.then john will try to send the message to the other clients (smith w/ resource2 or smith w/ resource3).

lets say,smith is,john send the message to other 2 clients.lets say,to smith@dbvismin2/resource2 same logic it first check it is not busy..if not.then accept the,smith with resource2 and john with resource4 will now communicating each can i do this?.i try this scenario and the receiver who received the message was smith who login this possible to happen?..pls shed a light with this..give some hint or sample code to do this...

many thanks.
Alex #2
Member since Feb 2003 · 4346 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
not sure if I understood your question correct. If I'm wrong please correct me and elaborate your question.

I think before you send a message you should check if the user is busy or not, and send the message to a resource which is not busy. Or to the most available resource. From the presence you know which resource is busy when the user updates the status with busy.

And there is also the priority which is a integer number in the presence. So you could use the priority as an indicator of load on a user. When a user is busy and can't process any messages right now then you yould set it to 100 (cpu load 100%). A resource which is not busy at all set priority to 1-10 etc..... Then before you send a message to a user/resource process all presences and priority and send to the most available user.

Let me know if this helps.

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