[jdev] Perl Net::XMPP::Roster functionality?

Norman Rasmussen norman at rasmussen.co.za
Fri Sep 14 03:56:53 CDT 2007


On 9/14/07, jdev at eriko.mobi <jdev at eriko.mobi> wrote:
>
> I'm trying to write a simple Perl script to log in, get a list of
> subscribed JIDs that are online, and then log off.  The documentation
> for Net::XMPP indiates that a Roster object will do this:


Here's a simple test program that should do what I want, however the
> online() method just doesn't seem to return anything.  Am I completely
> wrong about what the Roster object does, or could this be a bug?
>

Try doing the PresenceSend after the RosterRequest, and then add a delay
before checking the online method.  The reason for this is that the online
notifications are not send by the server immediately, but some time after
the initial PresenceSend (the exact duration is not possible to determine,
because it's up to the remote server to respond to the probe requests in
it's own time).

-- 
- Norman Rasmussen
- Email: norman at rasmussen.co.za
- Home page: http://norman.rasmussen.co.za/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20070914/d0f9fd72/attachment-0002.htm>


More information about the JDev mailing list