SleekXMPP/sleekxmpp
Lance Stout 9f1648328f Resolve timeout errors for get_roster.
See issue #89

Using get_roster will now return the same types of values as
Iq.send. If a timeout occurs, then the event 'roster_timeout'
will be fired. A successful call to get_roster will also
raise the 'roster_received' event.

To ensure that the get_roster call was successful, here
is a pattern to follow:

    def __init__(self, ...):
        ...
        self.add_event_handler('session_start', self.session_start)
        self.add_event_handler('roster_timeout', self.roster_timeout)
        self.add_event_handler('roster_received', self.roster_received)

    def session_start(self, e):
        self.send_presence()
        self.get_roster()

    def roster_timeout(self, e):
        # Optionally increase the timeout period
        self.get_roster(timeout=self.response_timeout * 2)

    def roster_received(self, iq):
        # Do stuff, roster has been initialized.
        ...
2011-05-20 12:56:00 -04:00
..
plugins Pubsub/Unsubscribe was not getting registered 2011-04-14 17:35:20 -07:00
stanza Use underscore method name. 2011-04-08 16:14:22 -04:00
test Add support for testing that no stanzas are sent in tests. 2011-04-26 16:32:58 -04:00
thirdparty Fix thirdparty imports for Python3 2011-01-19 17:49:39 -05:00
xmlstream Mark scheduler thread as a daemon. 2011-04-11 14:22:32 -04:00
__init__.py Add version info. 2011-04-08 16:39:39 -04:00
basexmpp.py Remap old method names in a better way. 2011-02-14 13:49:43 -05:00
clientxmpp.py Resolve timeout errors for get_roster. 2011-05-20 12:56:00 -04:00
componentxmpp.py Doesn't fail if host has NO SRV record 2010-11-09 01:53:41 +08:00
exceptions.py XMPPError exceptions can keep a stanza's contents. 2011-02-11 15:20:26 -05:00