Package nbxmpp :: Module tls_nb :: Class SSLWrapper

[hide private]
[frames] | no frames]

# Class SSLWrapper

source code

Abstract SSLWrapper base class

Nested Classes | [hide private]

| Error Generic SSL Error Wrapper

Instance Methods | [hide private]

__init__(self, sslobj, sock=None) | source code

recv(self, data, 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, sslobj, sock=None)
(Constructor)

source code

### recv(self, data, 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.

### send(self, data, flags=None, now=False)

source code

Send wrapper for SSL object