From fb20f64513140a95feecc537eb7f4b07e155e4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 28 Oct 2021 16:07:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-server/Server.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/http-server/Server.php b/http-server/Server.php index 5e71cbe4..20ff17e2 100644 --- a/http-server/Server.php +++ b/http-server/Server.php @@ -5,18 +5,12 @@ namespace Server; use Annotation\Inject; use Exception; -use Http\Constrict\Request; -use Http\Constrict\RequestInterface; -use Http\Constrict\Response; -use Http\Constrict\ResponseInterface; use Http\Handler\Abstracts\HttpService; use JetBrains\PhpStorm\Pure; use Kiri\Abstracts\Config; -use Kiri\Di\ContainerInterface; use Kiri\Error\LoggerProcess; use Kiri\Events\EventDispatch; use Kiri\Exception\ConfigException; -use Kiri\Rpc\RpcProvider; use Server\Events\OnShutdown; @@ -79,7 +73,8 @@ class Server extends HttpService $rpcService = Config::get('rpc', []); 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', []));