This commit is contained in:
2021-10-28 16:07:48 +08:00
parent 905c25fd10
commit fb20f64513
+2 -7
View File
@@ -5,18 +5,12 @@ namespace Server;
use Annotation\Inject; use Annotation\Inject;
use Exception; use Exception;
use Http\Constrict\Request;
use Http\Constrict\RequestInterface;
use Http\Constrict\Response;
use Http\Constrict\ResponseInterface;
use Http\Handler\Abstracts\HttpService; use Http\Handler\Abstracts\HttpService;
use JetBrains\PhpStorm\Pure; use JetBrains\PhpStorm\Pure;
use Kiri\Abstracts\Config; use Kiri\Abstracts\Config;
use Kiri\Di\ContainerInterface;
use Kiri\Error\LoggerProcess; use Kiri\Error\LoggerProcess;
use Kiri\Events\EventDispatch; use Kiri\Events\EventDispatch;
use Kiri\Exception\ConfigException; use Kiri\Exception\ConfigException;
use Kiri\Rpc\RpcProvider;
use Server\Events\OnShutdown; use Server\Events\OnShutdown;
@@ -79,7 +73,8 @@ class Server extends HttpService
$rpcService = Config::get('rpc', []); $rpcService = Config::get('rpc', []);
if (!empty($rpcService)) { if (!empty($rpcService)) {
RpcProvider::addRpcListener($this->manager, $rpcService); $this->manager->addListener($rpcService['type'], $rpcService['host'], $rpcService['port'],
$rpcService['mode'], $rpcService);
} }
$processes = array_merge($this->process, Config::get('processes', [])); $processes = array_merge($this->process, Config::get('processes', []));