mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 22:01:31 +00:00
Add helper method to ServerUplinkConnector for EH -> EH communication
This commit is contained in:
parent
69f03f7615
commit
a5d0359ab8
@ -25,6 +25,10 @@ class ServerUplinkConnector(ZMQConnectorBase):
|
|||||||
self._zmq_push_socket = self._zmq_context.socket(zmq.PUSH)
|
self._zmq_push_socket = self._zmq_context.socket(zmq.PUSH)
|
||||||
self._zmq_push_socket.connect('tcp://localhost:{}'.format(tfwenv.RECEIVER_PORT))
|
self._zmq_push_socket.connect('tcp://localhost:{}'.format(tfwenv.RECEIVER_PORT))
|
||||||
|
|
||||||
|
def send_to_eventhandler(self, key, response):
|
||||||
|
response['data']['key'] = key
|
||||||
|
self.send('mirror', response)
|
||||||
|
|
||||||
def send(self, key, response):
|
def send(self, key, response):
|
||||||
response['key'] = key
|
response['key'] = key
|
||||||
self._zmq_push_socket.send_multipart(serialize_all(key, response))
|
self._zmq_push_socket.send_multipart(serialize_all(key, response))
|
||||||
|
Loading…
Reference in New Issue
Block a user