如何读写GatewayWorker的SESSSION?

0
已邀请:

yanpeipan - Hi,Man

赞同来自:

看了一下代码, 需要修改源码,不知作者是否加入代码中?


public static function upsetSocketSession($client_id, $session_str)
{
$gateway_data = GatewayProtocol::$empty;
$gateway_data = GatewayProtocol::CMD_UPSET_SESSION;
$gateway_data = $client_id;
$gateway_data = $session_str;
return self::sendToGateway(Context::$local_ip . ':' . Context::$local_port, $gateway_data);
}

case GatewayProtocol::CMD_UPSET_SESSION:
if(isset($this->_clientConnections))
{
$session = Context::sessionDecode($this->_clientConnections->session) ?: [];
$upset = Context::sessionDecode($this->_clientConnections->session) ?: [];

$this->_clientConnections->session = Context::sessionEncode(array_merge($upset, $session));
}
break;

walkor

赞同来自:

目前GatewayWorker在重构,
楼主可以等待GatewayWorker重构完毕,在github上发个pull request


GatewayWorker大概两周内重构完毕

要回复问题请先登录注册