This commit is contained in:
as2252258@163.com
2021-07-20 01:37:16 +08:00
parent b369e5c492
commit b0f2b1077e
3 changed files with 44 additions and 366 deletions
+1 -4
View File
@@ -85,16 +85,13 @@ class ServerManager extends Abstracts\Server
* @throws NotFindClassException
* @throws ReflectionException
*/
public function start(): void
public function initBaseServer($configs): void
{
$context = ServerManager::getContext();
$configs = require_once 'server.php';
foreach ($this->sortService($configs['server']['ports']) as $config) {
$this->startListenerHandler($context, $config);
}
$this->addServerEventCallback($this->getSystemEvents($configs));
$context->server->start();
}