mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-12-23 02:11:55 +00:00
Refactor of ZMQWebsocketHandler callback (closure -> method)
This commit is contained in:
parent
863cc304ad
commit
8ee658e62a
@ -14,13 +14,12 @@ class ZMQWebSocketHandler(WebSocketHandler):
|
||||
|
||||
def open(self, *args, **kwargs):
|
||||
logging.debug('WebSocket connection initiated')
|
||||
event_handler_connector.register_callback(self.zmq_callback)
|
||||
|
||||
def zmq_callback(msg_parts):
|
||||
anchor, data = msg_parts
|
||||
logging.debug('Received on pull socket: {}'.format(data.decode()))
|
||||
self.write_message(data.decode())
|
||||
|
||||
event_handler_connector.register_callback(zmq_callback)
|
||||
def zmq_callback(self, msg_parts):
|
||||
anchor, data = msg_parts
|
||||
logging.debug('Received on pull socket: {}'.format(data.decode()))
|
||||
self.write_message(data.decode())
|
||||
|
||||
def on_message(self, message):
|
||||
logging.debug('Received on WebSocket: {}'.format(message))
|
||||
|
Loading…
Reference in New Issue
Block a user