diff --git a/Annotation/Port.php b/Annotation/Port.php deleted file mode 100644 index 7d239b87..00000000 --- a/Annotation/Port.php +++ /dev/null @@ -1,45 +0,0 @@ -getRouter(); - if (!($class instanceof Porters)) { - return true; - } - $router->addPortListen($this->port, [$class, 'process']); - return true; - } - -} diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index 98584c57..e99367d7 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -82,29 +82,6 @@ class Router extends HttpService implements RouterInterface } - /** - * @param $port - * @param Closure|array|string $closure - * @param null $method - * @return Node|bool|null - * @throws - */ - public function addPortListen($port, Closure|array|string $closure, $method = null): Node|null|bool - { - if (!is_string($closure)) { - return $this->addRoute('add-port-listen/port_' . $port, $closure, 'listen'); - } - if (empty($method)) { - return $this->addError($closure . '::' . $method); - } - $_closure = Snowflake::createObject($closure); - if (!method_exists($_closure, $method)) { - return $this->addError($closure . '::' . $method); - } - return $this->addRoute('add-port-listen/port_' . $port, [$_closure, $method], 'listen'); - } - - /** * @param $path * @param $handler