summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-11-03 12:39:44 -0400
committerLance Stout <lancestout@gmail.com>2010-11-03 12:39:44 -0400
commit576993572098d4482512fe6ae2cb91bf67cbb9f8 (patch)
treea2fec7efb8de747a0ef949118740355e34b824d4 /sleekxmpp/xmlstream
parent0214db75451627c4e0d666e8567db24da31e4056 (diff)
parent9e248bb8527c1903486756b4166e9e548a8eb8e2 (diff)
downloadslixmpp-576993572098d4482512fe6ae2cb91bf67cbb9f8.tar.gz
slixmpp-576993572098d4482512fe6ae2cb91bf67cbb9f8.tar.bz2
slixmpp-576993572098d4482512fe6ae2cb91bf67cbb9f8.tar.xz
slixmpp-576993572098d4482512fe6ae2cb91bf67cbb9f8.zip
Merge branch 'develop' of github.com:fritzy/SleekXMPP into develop
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index d47557b7..16412711 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -379,6 +379,7 @@ class XMLStream(object):
"""
if self.ssl_support:
logging.info("Negotiating TLS")
+ logging.info("Using SSL version: %s" % str(self.ssl_version))
ssl_socket = ssl.wrap_socket(self.socket,
ssl_version=self.ssl_version,
do_handshake_on_connect=False)
@@ -527,6 +528,17 @@ class XMLStream(object):
self.__event_handlers[name] = filter(filter_pointers,
self.__event_handlers[name])
+ def event_handled(self, name):
+ """
+ Indicates if an event has any associated handlers.
+
+ Returns the number of registered handlers.
+
+ Arguments:
+ name -- The name of the event to check.
+ """
+ return len(self.__event_handlers.get(name, []))
+
def event(self, name, data={}, direct=False):
"""
Manually trigger a custom event.