[JDEV] iq question
zak
zsy at photoalley.com
Tue Jan 15 13:12:15 CST 2002
ah. thanks. for some reason i thought i had to maintain the id that was
returned by the server when i started the session.
regards, zak.
On Tuesday 15 January 2002 09:51 am, you wrote:
> Technically, you should be giving each message (or ones that you're waiting
> on a reply for) a different ID rather than the same ID. The way I do it is
> to have a global ID counter that increments every time it is
> called. Jabber IM uses a string-based unique ID approach. Any way works
> as long as the ID can be unique within your own context.
>
> Thanks,
> Chris
>
> At 03:56 PM 1/14/2002, you wrote:
> >hello,
> >
> >i was wondering if there is a way to send an id/key element to the the
> > server which the server will return in it's reply on a iq packet by
> > packet basis. basically, my concern is that some replies from the server
> > simply return something like <iq type="result" id="1001"/> to signal a
> > successful iq operation. however, if i have different components
> > listening for iq packets, but in different contexts then it's not
> > possible for my listeners to know when the success signal was meant for
> > them or not. is there some other mechanism that i can use for this?
> >
> >for a concrete example i have a listener that waits for the return iq
> > packet after authenticating, jabber:iq:auth, which returns <iq
> > type="result" id="1001"/> for success and another listener that listens
> > for iq packets for jabber:iq:private which can also return <iq
> > type="result" id="1001"/>. my intent was for each listener to get both
> > packets and to leave it up to the listeners to filter out the packets
> > their interested in.
> >
> >any help with this would be appreciated.
> >
> >zak.
> >_______________________________________________
> >jdev mailing list
> >jdev at jabber.org
> >http://mailman.jabber.org/listinfo/jdev
>
> PGP at ldap://certserver.pgp.com/
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list