summaryrefslogtreecommitdiffstats
path: root/src/console/zmq/auth/ioloop.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-08-30 11:41:42 +0300
committerimarom <imarom@cisco.com>2015-08-30 11:41:42 +0300
commitc9381643e7bf9b3dc690bf3e012ad6176ee32b8c (patch)
treeff0e91ee5c38f2caaeaa53340ecf2db2a326455a /src/console/zmq/auth/ioloop.py
parent05a529031e962d61ab977393fb3d153931feff34 (diff)
parent53f0e28d7f30c7175cbb15884c309613593859d8 (diff)
Merge branch 'master' into rpc
Conflicts: linux/ws_main.py linux_dpdk/ws_main.py
Diffstat (limited to 'src/console/zmq/auth/ioloop.py')
-rwxr-xr-xsrc/console/zmq/auth/ioloop.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/console/zmq/auth/ioloop.py b/src/console/zmq/auth/ioloop.py
deleted file mode 100755
index 1f448b47..00000000
--- a/src/console/zmq/auth/ioloop.py
+++ /dev/null
@@ -1,34 +0,0 @@
-"""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']