Merge branch 'wip_react_sockt_test' into develop

This commit is contained in:
Mark Friedrich
2019-03-01 14:22:25 +01:00
22 changed files with 481 additions and 404 deletions

View File

@@ -14,7 +14,6 @@ use lib\api\CcpClient;
use lib\Config;
use lib\Resource;
use lib\Monolog;
use lib\Socket;
use lib\Util;
use Model;
use DB;
@@ -491,7 +490,7 @@ class Controller {
* @param bool $deleteSession
* @param bool $deleteLog
* @param bool $deleteCookie
* @throws \ZMQSocketException
* @throws \Exception
*/
protected function logoutCharacter(\Base $f3, bool $all = false, bool $deleteSession = true, bool $deleteLog = true, bool $deleteCookie = false){
$sessionCharacterData = (array)$f3->get(Api\User::SESSION_KEY_CHARACTERS);
@@ -517,7 +516,7 @@ class Controller {
if($characterIds){
// broadcast logout information to webSocket server
(new Socket( Config::getSocketUri() ))->sendData('characterLogout', $characterIds);
$f3->webSocket()->write('characterLogout', $characterIds);
}
}
@@ -974,15 +973,4 @@ class Controller {
return Config::getEnvironmentData($key);
}
/**
* health check for ICP socket -> ping request
* @param $ttl
* @param $load
* @throws \ZMQSocketException
*/
static function checkTcpSocket($ttl, $load){
(new Socket( Config::getSocketUri(), $ttl ))->sendData('healthCheck', $load);
}
}