summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/xmlstream.py
AgeCommit message (Collapse)Author
2011-08-25Session timeout now defaults to 45sec, but can be adjusted.Lance Stout
e.g. self.session_timeout = 15 It is also managed by XMLStream instead of ClientXMPP now.
2011-08-25Handle sending stanzas in chunks if the socket has poor performance.Lance Stout
2011-08-25Shutdown socket before closing.Lance Stout
2011-08-25Update scheduler with locks and ability to remove tasks.Lance Stout
Scheduled tasks must have a unique name.
2011-08-25Add overridable method self.configure_socket().Lance Stout
Allows for setting app specific socket timeouts and other socket options.
2011-08-24Fix handling of DNS exceptions.Lance Stout
2011-08-18Route all unhandled exceptions through XMLStream.exception.Lance Stout
Or through an equivalent override.
2011-08-18PEP8 editsLance Stout
2011-08-18Up the timeout to 30sec instead of 10sec.Lance Stout
2011-08-18added inline documentation for new dns methodsNathan Fritz
2011-08-18Fix exceptions for Python3Lance Stout
2011-08-18DNS is now properly checked and different answers are tried for each ↵Nathan Fritz
reconnect until exhausted
2011-08-13I've seen people complain about Sleek taking so long to disconnect.Lance Stout
Added logging to say that we're waiting for the server to end the stream from its end.
2011-08-12Reduce the maximum delay between connection retries to 10min.Lance Stout
2011-08-04Fix Python3 issue with dict.has_key()Lance Stout
2011-08-04added block as process option and updated documentation. added typical use ↵Nathan Fritz
example to ClientXMPP.
2011-07-27Add support for HTTP Proxy connections.Lance Stout
2011-07-04Added wait parameter to disconnect.Lance Stout
If wait=True, then the disconnect call will block until the send queue has emptied. WARNING: Using wait=True when more stanzas are being added to the queue than can be processed such that the queue is never empty will cause the disconnect call to block indefinitely without actually disconnecting.
2011-07-01So using sys.excepthook to catch errors only works once.Lance Stout
The error bubbles through the event processing loop, breaking it and hanging the application. Instead, there is now a .exception(e) method on XMLStream which may be overridden or reassigned that will receive all unhandled exceptions (read: not XMPPError) from event and stream handlers.
2011-06-20Fix stanza clobbering when replying to errors.sleek-1.0.0-beta5sleek-1.0-Beta51.0.0-beta51.0-Beta5Lance Stout
If a stanza handler raised an exception, the exception was processed and replied by the modified stanza, not a stanza with the original content. A copy is now made before handler processing, and if an exception occurs it is the copy that processes the exception using the original content.
2011-06-08Added session_end event and some docs.Lance Stout
For now, session_end is the same as disconnected, but once support is added later for stream management, the two events will become distinct. Plugins should add handlers for session_end for cleaning any session state.
2011-06-01Cache stanza if sending fails.Lance Stout
The stanza will be sent first once the send queue is reactivated after session start. Stanzas sent by skipping the queue will not be cached.
2011-05-31Apply connection backoff to reconnect attempts.Lance Stout
Backoff was only being done for the initial connection attempt before. Now any reconnection will start with a minimum 1 sec delay which will approximately double between attempts.
2011-05-31Cleanup logging and exception handling.Lance Stout
The syntax and attribute errors raised during a disconnect/reconnect attempt are now caught and produce nicer log messages.
2011-05-27Don't use the send queue for stream initialization.Lance Stout
Use the parameter now=True to skip the queue when sending Iq stanzas, or using xmpp.send().
2011-05-27Fix typo for SSL certificate use.Lance Stout
2011-05-27Add exponential backoff to connection attempts.Lance Stout
Delay will approximately double between attempts (random variation). See issue #67.
2011-05-27Added support for testind disconnect errors.Lance Stout
2011-03-18Fix self.disconnect(reconnect=True) not working.Lance Stout
2011-02-23Bring back the signal handlers (and the "killed" event).Lance Stout
Now done more responsibly, saving any existing signal handlers and calling them when an interrupt occurs in addition to the one Sleek installs. NOTE: You may need to explicitly use "kill <process id>" in order to trigger the proper signal handler execution, and to raise the "killed" event.
2011-02-14Use the _build_stanza method.Lance Stout
2011-02-14Remap old method names in a better way.Lance Stout
This should prevent some reference cycles that will cause garbage collection issues.
2011-02-13Simplification when removing a deletable handler.Lance Stout
2011-01-27Recognize stanzas that don't use the default namespace.Lance Stout
2011-01-16Raise the event 'socket_error' when a socket error occurs.Lance Stout
Will be most useful for debugging and responding to failed connection attempts.
2011-01-14Add a note for debug statement when running scheduled events.Lance Stout
Fixes the intermittent DEBUG ((),) messages that give no explanation. Will now show as: DEBUG Scheduled event: ((), )
2010-12-17Make tests pass for catching exceptions.Lance Stout
May now use sys.excepthook to catch exceptions from threaded handlers.
2010-12-16Use daemon threads instead of signals.Lance Stout
Daemonized threads exit once the main program has quit, and the only threads left running are all daemon threads. Should fix hanging clients while not trampling over anyone else's signal handlers.
2010-12-16Added support for using SSL CA certificates.Lance Stout
Originally provided by Brian Beggs (macdiesel) and Thom Nichols (tomstrummer).
2010-12-07Add support for using xml:lang values.Lance Stout
Support is only for adding literal XML content to stanzas. Full support for things like multiple message bodies with different xml:lang values is still in the works.
2010-11-17Fix RESPONSE_TIMEOUT dependency loops.Lance Stout
2010-11-06Logging no longer uses root logger.Lance Stout
Each module should now log into its own logger.
2010-11-05Simplified SleekTest.Lance Stout
* check_stanza does not require stanza_class parameter. Introspection! * check_message, check_iq, and check_presence removed -- use check instead. * stream_send_stanza, stream_send_message, stream_send_iq, and stream_send_presence removed -- use send instead. * Use recv instead of recv_message, recv_presence, etc. * check_jid instead of check_JID * stream_start may accept multi=True to return a new SleekTest instance for testing multiple streams at once.
2010-11-04Fix bug introduced while fixing another bug.Lance Stout
Threaded event handlers now handle exceptions again.
2010-11-04fixed indent errorsNathan Fritz
2010-11-03Merge branch 'develop' of github.com:fritzy/SleekXMPP into developLance Stout
2010-11-03Catch exceptions for direct events.Lance Stout
Events triggered with direct=True will have exceptions caught. Note that all event handlers in a direct event will currently run in the same thread.
2010-10-31Fix bug in XEP-0030 plugin.Lance Stout
xep_0030 still referenced event_handlers. Added the method event_handled which will return the number of registered handlers for an event to resolve the issue.
2010-10-28Added try/except for setting signal handlers.Lance Stout
Setting signal handlers from inside a thread is not supported in Python, but some applications need to run Sleek from a child thread. SleekXMPP applications that run inside a child thread will NOT be able to detect SIGHUP or SIGTERM events. Those must be caught and managed by the main program.
2010-10-27SSL and signal fixes.Lance Stout
Made setting the SIG* handlers conditional on if the signal defined for the OS. Added the attribute ssl_version to XMLStream to set the version of SSL used during connection. It defaults to ssl.PROTOCOL_TLSv1, but OpenFire tends to require ssl.PROTOCOL_SSLv23.