diff options
author | Lance Stout <lancestout@gmail.com> | 2010-10-06 14:09:14 -0400 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2010-10-06 14:09:14 -0400 |
commit | 9e2cada19eb9704bebadf6e4d382bda5d42015c9 (patch) | |
tree | 04ef3999fb3e24277619bda5e79e6a0bc421002c /sleekxmpp/__init__.py | |
parent | d0ccbf6b7a1b79a5497a3108fcda8c6e9fe405ed (diff) | |
download | slixmpp-9e2cada19eb9704bebadf6e4d382bda5d42015c9.tar.gz slixmpp-9e2cada19eb9704bebadf6e4d382bda5d42015c9.tar.bz2 slixmpp-9e2cada19eb9704bebadf6e4d382bda5d42015c9.tar.xz slixmpp-9e2cada19eb9704bebadf6e4d382bda5d42015c9.zip |
Missed a few docstrings.
Diffstat (limited to 'sleekxmpp/__init__.py')
-rw-r--r-- | sleekxmpp/__init__.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sleekxmpp/__init__.py b/sleekxmpp/__init__.py index 26982a54..023292ba 100644 --- a/sleekxmpp/__init__.py +++ b/sleekxmpp/__init__.py @@ -239,6 +239,12 @@ class ClientXMPP(BaseXMPP): return True def _handle_starttls(self, xml): + """ + Handle notification that the server supports TLS. + + Arguments: + xml -- The STARTLS proceed element. + """ if not self.authenticated and self.ssl_support: tls_ns = 'urn:ietf:params:xml:ns:xmpp-tls' self.add_handler("<proceed xmlns='%s' />" % tls_ns, @@ -253,11 +259,22 @@ class ClientXMPP(BaseXMPP): return False def _handle_tls_start(self, xml): + """ + Handle encrypting the stream using TLS. + + Restarts the stream. + """ logging.debug("Starting TLS") if self.start_tls(): raise RestartStream() def _handle_sasl_auth(self, xml): + """ + Handle authenticating using SASL. + + Arguments: + xml -- The SASL mechanisms stanza. + """ if '{urn:ietf:params:xml:ns:xmpp-tls}starttls' in self.features: return False |