From d3907f0dcac6c6e0d7b3c3abe69c64fe4e9dcaa6 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Tue, 28 Feb 2017 14:21:30 +0200 Subject: PyZMQ restore removed by accident version of Python3/32 bits Change-Id: Ie8a54015a02bdcc5cd0a50faff7b82cf0ad8de93 Signed-off-by: Yaroslav Brustinov --- .../python3/ucs4/32bit/zmq/auth/ioloop.py | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 scripts/external_libs/pyzmq-14.5.0/python3/ucs4/32bit/zmq/auth/ioloop.py (limited to 'scripts/external_libs/pyzmq-14.5.0/python3/ucs4/32bit/zmq/auth/ioloop.py') diff --git a/scripts/external_libs/pyzmq-14.5.0/python3/ucs4/32bit/zmq/auth/ioloop.py b/scripts/external_libs/pyzmq-14.5.0/python3/ucs4/32bit/zmq/auth/ioloop.py new file mode 100644 index 00000000..1f448b47 --- /dev/null +++ b/scripts/external_libs/pyzmq-14.5.0/python3/ucs4/32bit/zmq/auth/ioloop.py @@ -0,0 +1,34 @@ +"""ZAP Authenticator integrated with the tornado IOLoop. + +.. versionadded:: 14.1 +""" + +# Copyright (C) PyZMQ Developers +# Distributed under the terms of the Modified BSD License. + +from zmq.eventloop import ioloop, zmqstream +from .base import Authenticator + + +class IOLoopAuthenticator(Authenticator): + """ZAP authentication for use in the tornado IOLoop""" + + def __init__(self, context=None, encoding='utf-8', log=None, io_loop=None): + super(IOLoopAuthenticator, self).__init__(context) + self.zap_stream = None + self.io_loop = io_loop or ioloop.IOLoop.instance() + + def start(self): + """Start ZAP authentication""" + super(IOLoopAuthenticator, self).start() + self.zap_stream = zmqstream.ZMQStream(self.zap_socket, self.io_loop) + self.zap_stream.on_recv(self.handle_zap_message) + + def stop(self): + """Stop ZAP authentication""" + if self.zap_stream: + self.zap_stream.close() + self.zap_stream = None + super(IOLoopAuthenticator, self).stop() + +__all__ = ['IOLoopAuthenticator'] -- cgit 1.2.3-korg