- Improved "health check" for WebSocket

This commit is contained in:
Exodus4D
2017-01-21 23:21:25 +01:00
parent 07c0127e92
commit 378203f582
6 changed files with 81 additions and 15 deletions

View File

@@ -808,13 +808,14 @@ class Controller {
return Config::getEnvironmentData($key);
}
/**
* health check for ICP socket -> ping request
* @param $ttl
* @return bool|string
* @param $load
*/
static function checkTcpSocket($ttl){
return (new Socket( Config::getSocketUri(), $ttl ))->sendData('healthCheck');
static function checkTcpSocket($ttl, $load){
(new Socket( Config::getSocketUri(), $ttl ))->sendData('healthCheck', $load);
}
/**