变更
This commit is contained in:
+3
-11
@@ -4,15 +4,12 @@
|
|||||||
namespace Kiri\Server;
|
namespace Kiri\Server;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use JetBrains\PhpStorm\Pure;
|
|
||||||
use Kiri;
|
use Kiri;
|
||||||
use Kiri\Abstracts\Config;
|
use Kiri\Abstracts\Config;
|
||||||
use Kiri\Events\EventDispatch;
|
use Kiri\Events\EventDispatch;
|
||||||
use Kiri\Events\EventProvider;
|
use Kiri\Events\EventProvider;
|
||||||
use Kiri\Exception\ConfigException;
|
use Kiri\Exception\ConfigException;
|
||||||
use Kiri\Message\Handler\Abstracts\HttpService;
|
use Kiri\Router\Router;
|
||||||
use Kiri\Message\Handler\Router;
|
|
||||||
use Kiri\Server\Events\OnServerBeforeStart;
|
|
||||||
use Kiri\Server\Events\OnShutdown;
|
use Kiri\Server\Events\OnShutdown;
|
||||||
use Kiri\Server\Events\OnWorkerStart;
|
use Kiri\Server\Events\OnWorkerStart;
|
||||||
use Kiri\Server\Events\OnTaskerStart;
|
use Kiri\Server\Events\OnTaskerStart;
|
||||||
@@ -20,10 +17,6 @@ use Psr\Container\ContainerExceptionInterface;
|
|||||||
use Kiri\Di\ContainerInterface;
|
use Kiri\Di\ContainerInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Kiri\Server\Events\OnWorkerStop;
|
use Kiri\Server\Events\OnWorkerStop;
|
||||||
use ReflectionException;
|
|
||||||
use Swoole\WebSocket\Server as WsServer;
|
|
||||||
use Swoole\Server as SServer;
|
|
||||||
use Swoole\Http\Server as HServer;
|
|
||||||
use Swoole\Coroutine;
|
use Swoole\Coroutine;
|
||||||
use Kiri\Server\Abstracts\ProcessManager;
|
use Kiri\Server\Abstracts\ProcessManager;
|
||||||
use Kiri\Server\Abstracts\AsyncServer;
|
use Kiri\Server\Abstracts\AsyncServer;
|
||||||
@@ -36,7 +29,7 @@ defined('PID_PATH') or define('PID_PATH', APP_PATH . 'storage/server.pid');
|
|||||||
* Class Server
|
* Class Server
|
||||||
* @package Http
|
* @package Http
|
||||||
*/
|
*/
|
||||||
class Server extends HttpService
|
class Server
|
||||||
{
|
{
|
||||||
|
|
||||||
private mixed $daemon = 0;
|
private mixed $daemon = 0;
|
||||||
@@ -69,7 +62,6 @@ class Server extends HttpService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ConfigException
|
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ContainerExceptionInterface
|
||||||
* @throws NotFoundExceptionInterface
|
* @throws NotFoundExceptionInterface
|
||||||
*/
|
*/
|
||||||
@@ -95,7 +87,7 @@ class Server extends HttpService
|
|||||||
* @param $process
|
* @param $process
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function addProcess($process)
|
public function addProcess($process): void
|
||||||
{
|
{
|
||||||
$this->processManager->add($process);
|
$this->processManager->add($process);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user