pyzwave.dtlsconnection module

class pyzwave.dtlsconnection.DTLSConnection

Bases: threading.Thread

Connection object to create a DTLS connection using PSK

clientCb(_ssl, where, ret)
clientPskCb(_ssl, _hint, identity, _maxIdenityLen, cpsk, _maxPskLen)

Callback function used by ssl to get the DTLS psk

async connect(address, psk)

Connect to remote using psk

createDtlsPskSock()

Create a new socket and configure it for DTLS PSK

listen(psk)

Start server socket

onMessage(cbfn)

Set the callback function to use when data has arrived

run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

send(msg)

Send bytes to socket

serverPskCb(_ssl, _identity, cpsk, _maxPskLen)

Callback function used by ssl to get the DTLS psk

stop()

Stop the thread