This commit is contained in:
xl
2024-06-20 17:30:49 +08:00
parent e9367ec735
commit 6cdb51dd18
2 changed files with 35 additions and 4 deletions
+8 -4
View File
@@ -45,7 +45,11 @@ trait TraitServer
if (isset($this->_process[$name->getName()])) {
throw new Exception('Process(' . $name->getName() . ') is exists.');
}
$this->_process[$name->getName()] = $this->genProcess($name);
$process = $this->genProcess($name);
if ($name->isEnableQueue()) {
$process->useQueue();
}
$this->_process[$name->getName()] = $process;
}
}
@@ -192,10 +196,10 @@ trait TraitServer
{
return match ($type) {
Constant::SERVER_TYPE_BASE, Constant::SERVER_TYPE_TCP,
Constant::SERVER_TYPE_UDP => Server::class,
Constant::SERVER_TYPE_HTTP => HServer::class,
Constant::SERVER_TYPE_UDP => Server::class,
Constant::SERVER_TYPE_HTTP => HServer::class,
Constant::SERVER_TYPE_WEBSOCKET => WServer::class,
default => null
default => null
};
}