From adb8f04c25b7e7383ce0d44ef39203d9bb216052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 3 Mar 2021 13:52:25 +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 --- Annotation/Annotation.php | 3 +++ HttpServer/Server.php | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Annotation/Annotation.php b/Annotation/Annotation.php index 6e3dfc02..6f0ed21b 100644 --- a/Annotation/Annotation.php +++ b/Annotation/Annotation.php @@ -82,6 +82,9 @@ class Annotation extends Component */ private function scanDir(array $paths, string $namespace, string $alias): static { + if ($alias == 'sockets') { + var_dump($paths); + } foreach ($paths as $path) { $explode = explode('/', $path); diff --git a/HttpServer/Server.php b/HttpServer/Server.php index e7588a9c..3564fde6 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -370,11 +370,12 @@ class Server extends HttpService $settings['pid_file'] = PID_PATH; } $this->debug(sprintf('Check listen %s::%d -> ok', $config['host'], $config['port'])); - if ($this->baseServer instanceof Websocket) { - $this->onLoadWebsocketHandler(); - } else if ($this->baseServer instanceof Http) { + + $this->onLoadWebsocketHandler(); + if ($this->baseServer instanceof Http) { $this->onLoadHttpHandler(); } + $this->baseServer->set($settings); $this->onProcessListener();