Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
roymanish1982 #1
Member since Mar 2011 · 20 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to Route the Message form One client to Othere
Hi,

Can any one pls help me to identify , if 2 client is connected with the same server
1. how will i able to identify that which Socket is for which client
2. To Route a Message form one client to Other client  C1==> server ==>C2

Any help will be appreciate.

Thanks
Manish Roy
Avatar
Alex #2
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
1) you have to hold a dictionary in your code with all sockets mapped to the clients jid
2) when you have the dictionary in 1) then you can easily lookup the correct socket and pass the message from one socket to the other.

Alex
Avatar
roymanish1982 #3
Member since Mar 2011 · 20 posts
Group memberships: Members
Show profile · Link to this post
Hi,

At the Time of Streaming or Handshake with server my stanzas look like

Client :
SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="192.168.170.194" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="localhost" xmlns="jabber:client" id="fa49c7c3-f7dd-4661-aad3-fe9103070798" >

id do u mean this ID ?

Server :

In this Case id is different in both the Request  .. How should i Handle this ...

<iq id="MX_1" type="get" xmlns="jabber:client">
  <query xmlns="jabber:iq:auth">
    <password>manish</password>
    <username>manish.roy</username>
  </query>
</iq><iq id="MX_2" type="get" xmlns="jabber:client">
  <query xmlns="jabber:iq:roster" />
</iq><presence xmlns="jabber:client">
  <show>chat</show>
  <status>ready for chat</status>
  <priority>1</priority>
</presence>

I think i have got confused  :scared:

Can u please guid me
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