nbxmpp.tls_nb.StdlibSSLWrapper

Package nbxmpp :: Module tls_nb :: Class StdlibSSLWrapper |
[hide private]
[frames] | no frames]

# Class StdlibSSLWrapper

source code

Wrapper class for Python socket.ssl read() and write() methods

Nested Classes | [hide private]
Inherited from `SSLWrapper`: `Error`

Instance Methods | [hide private]
__init__(self, *args) | source code
recv(self, bufsize, flags=None) Receive wrapper for SSL object | source code
send(self, data, flags=None, now=False) Send wrapper for SSL object | source code

Method Details | [hide private]

### __init__(self, *args) (Constructor) | source code
Overrides: SSLWrapper.__init__

### recv(self, bufsize, flags=None) | source code
Receive wrapper for SSL object We can return None out of this function to signal that no data is available right now. Better than an exception, which differs depending on which SSL lib we're using. Unfortunately returning '' can indicate that the socket has been closed, so to be sure, we avoid this by returning None. Overrides: SSLWrapper.recv (inherited documentation)

### send(self, data, flags=None, now=False) | source code
Send wrapper for SSL object Overrides: SSLWrapper.send (inherited documentation)