...
|
...
|
@@ -47,6 +47,8 @@ class RpcSession extends Root implements SessionHandlerInterface |
|
|
|
|
|
private $serviceUrl = '';
|
|
|
|
|
|
private $rpcType = 'yar';
|
|
|
|
|
|
/**
|
|
|
* 初始化
|
|
|
*/
|
...
|
...
|
@@ -70,6 +72,12 @@ class RpcSession extends Root implements SessionHandlerInterface |
|
|
$this->serviceUrl = $serviceUrl;
|
|
|
}
|
|
|
|
|
|
public function setRpcType($type)
|
|
|
{
|
|
|
$this->rpcType = $type;
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
public function setSessionName($sessionName)
|
|
|
{
|
|
|
if (!empty($sessionName)) {
|
...
|
...
|
@@ -120,7 +128,7 @@ class RpcSession extends Root implements SessionHandlerInterface |
|
|
}
|
|
|
$this->setOption();
|
|
|
if (empty($this->serviceClient)) {
|
|
|
$this->serviceClient = Factory::getInstance($this->serviceUrl);
|
|
|
$this->serviceClient = Factory::getInstance($this->serviceUrl, $this->rpcType);
|
|
|
}
|
|
|
return $this->serviceClient;
|
|
|
}
|
...
|
...
|
|