改名
This commit is contained in:
+2
-14
@@ -103,30 +103,18 @@ class Server extends HttpService
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $configs
|
|
||||||
* @return Packet|Websocket|Receive|Http|null
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function initCore(array $configs): Packet|Websocket|Receive|Http|null
|
|
||||||
{
|
|
||||||
$this->orders($configs);
|
|
||||||
return $this->getServer();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $configs
|
* @param $configs
|
||||||
* @return Packet|Websocket|Receive|Http|null
|
* @return Packet|Websocket|Receive|Http|null
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function orders($configs): Packet|Websocket|Receive|Http|null
|
private function initCore($configs): Packet|Websocket|Receive|Http|null
|
||||||
{
|
{
|
||||||
$servers = $this->sortServers($configs);
|
$servers = $this->sortServers($configs);
|
||||||
foreach ($servers as $server) {
|
foreach ($servers as $server) {
|
||||||
$this->create($server);
|
$this->create($server);
|
||||||
if (!$this->baseServer) {
|
if (!$this->baseServer) {
|
||||||
return null;
|
throw new Exception('Base service create fail.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $this->startRpcService();
|
return $this->startRpcService();
|
||||||
|
|||||||
Reference in New Issue
Block a user