[jdev] Initial presence and contact capabilities
Dave Cridland
dave at cridland.net
Fri Dec 5 03:19:21 CST 2008
On Thu Dec 4 10:57:11 2008, Senko Rasic wrote:
> consider the following scenario:
> 1. user is offline
> 2. user wants to call some contact in roster via Jingle (or
> actually do anything which requires knowledge of contact's
> capabilities) which is in his/her roster
> 3. users's client comes online, requests roster, sends initial
> presence, etc.
> 4. user's server sends out presence probes, and presence from
> contacts comes in
> 5. after presence from contact is received, capabilities can be
> discovered and the user's action can proceed
>
> The trouble is that there's no way of knowing when 4. finishes,
> so the client doesn't know if a particular contact's presence
> is unavailable, or just wasn't received yet.
Yes, you just need to timeout - as Justin says, some servers will
send you the offline presence in response to a probe, too, which will
cut short your timeout.
One thing that makes the timeout rather more bearable is if you ping
the domain (or bare jid) of the contact. In this instance, you at
least know the RTT for stanzas at that point, and also know whether
the S2S link came up, so you know you *should* be getting probe
responses very soon.
Dave.
--
Dave Cridland - mailto:dave at cridland.net - xmpp:dwd at dave.cridland.net
- acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
- http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade
More information about the JDev
mailing list