From 2d6e56500cf7c914f977cf0be6647a29392357dc Mon Sep 17 00:00:00 2001 From: Exodus4D Date: Thu, 19 Jan 2017 20:33:01 +0100 Subject: [PATCH] - WIP changed REQ/REP Socket config to PUSH/PULL Socket config --- app/Main/MapUpdate.php | 3 ++- app/WebSockets.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Main/MapUpdate.php b/app/Main/MapUpdate.php index 0a4e03c..ee8e578 100644 --- a/app/Main/MapUpdate.php +++ b/app/Main/MapUpdate.php @@ -388,7 +388,8 @@ class MapUpdate implements MessageComponentInterface { $response = $this->deleteMapId($task, $load); break; case 'healthCheck': - $response = 1; + $this->log('Health'); + $response = 'OK'; break; } diff --git a/app/WebSockets.php b/app/WebSockets.php index 3972c15..c21afdb 100644 --- a/app/WebSockets.php +++ b/app/WebSockets.php @@ -34,7 +34,8 @@ class WebSockets { // Listen for the web server to make a ZeroMQ push after an ajax request $context = new React\ZMQ\Context($loop); - $pull = $context->getSocket(\ZMQ::SOCKET_REP); + //$pull = $context->getSocket(\ZMQ::SOCKET_REP); + $pull = $context->getSocket(\ZMQ::SOCKET_PULL); // Binding to 127.0.0.1 means, the only client that can connect is itself $pull->bind( $this->dns );