eee
This commit is contained in:
@@ -12,13 +12,13 @@ interface OnReceiveInterface
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Server $server
|
* @param Server $server
|
||||||
* @param int $fd
|
* @param int $fd
|
||||||
* @param int $reactor_id
|
* @param int $reactor_id
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @return void
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function onReceive(Server $server, int $fd, int $reactor_id, string $data): bool;
|
public function onReceive(Server $server, int $fd, int $reactor_id, string $data): bool;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ namespace Kiri\Server\Handler;
|
|||||||
use Exception;
|
use Exception;
|
||||||
use Kiri;
|
use Kiri;
|
||||||
use Kiri\Core\Xml;
|
use Kiri\Core\Xml;
|
||||||
use Kiri\Core\Json;
|
|
||||||
use Kiri\Di\Inject\Container;
|
use Kiri\Di\Inject\Container;
|
||||||
use Kiri\Di\Context;
|
use Kiri\Di\Context;
|
||||||
use Kiri\Di\Interface\ResponseEmitterInterface;
|
use Kiri\Di\Interface\ResponseEmitterInterface;
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ class OnServer extends Server
|
|||||||
/**
|
/**
|
||||||
* @param SServer $server
|
* @param SServer $server
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
*/
|
||||||
public function onStart(SServer $server): void
|
public function onStart(SServer $server): void
|
||||||
{
|
{
|
||||||
@@ -48,8 +46,6 @@ class OnServer extends Server
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param SServer $server
|
* @param SServer $server
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
public function onBeforeShutdown(SServer $server): void
|
public function onBeforeShutdown(SServer $server): void
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
namespace Kiri\Server\Handler;
|
namespace Kiri\Server\Handler;
|
||||||
|
|
||||||
use Kiri;
|
use Kiri;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Kiri\Server\Abstracts\Server;
|
use Kiri\Server\Abstracts\Server;
|
||||||
use Kiri\Server\Events\OnManagerStart;
|
use Kiri\Server\Events\OnManagerStart;
|
||||||
@@ -21,8 +19,7 @@ class OnServerManager extends Server
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \Swoole\Server $server
|
* @param \Swoole\Server $server
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ReflectionException
|
||||||
* @throws NotFoundExceptionInterface|ReflectionException
|
|
||||||
*/
|
*/
|
||||||
public function onManagerStart(\Swoole\Server $server): void
|
public function onManagerStart(\Swoole\Server $server): void
|
||||||
{
|
{
|
||||||
@@ -35,8 +32,7 @@ class OnServerManager extends Server
|
|||||||
/**
|
/**
|
||||||
* @param \Swoole\Server $server
|
* @param \Swoole\Server $server
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ReflectionException
|
||||||
* @throws NotFoundExceptionInterface|ReflectionException
|
|
||||||
*/
|
*/
|
||||||
public function onManagerStop(\Swoole\Server $server): void
|
public function onManagerStop(\Swoole\Server $server): void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ class OnServerWorker extends \Kiri\Server\Abstracts\Server
|
|||||||
* @param Server $server
|
* @param Server $server
|
||||||
* @param int $workerId
|
* @param int $workerId
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function onWorkerStart(Server $server, int $workerId): void
|
public function onWorkerStart(Server $server, int $workerId): void
|
||||||
@@ -71,8 +69,7 @@ class OnServerWorker extends \Kiri\Server\Abstracts\Server
|
|||||||
/**
|
/**
|
||||||
* @param Server $server
|
* @param Server $server
|
||||||
* @param int $workerId
|
* @param int $workerId
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ReflectionException
|
||||||
* @throws NotFoundExceptionInterface|ReflectionException
|
|
||||||
*/
|
*/
|
||||||
public function onWorkerStop(Server $server, int $workerId): void
|
public function onWorkerStop(Server $server, int $workerId): void
|
||||||
{
|
{
|
||||||
@@ -84,8 +81,7 @@ class OnServerWorker extends \Kiri\Server\Abstracts\Server
|
|||||||
/**
|
/**
|
||||||
* @param Server $server
|
* @param Server $server
|
||||||
* @param int $workerId
|
* @param int $workerId
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ReflectionException
|
||||||
* @throws NotFoundExceptionInterface|ReflectionException
|
|
||||||
*/
|
*/
|
||||||
public function onWorkerExit(Server $server, int $workerId): void
|
public function onWorkerExit(Server $server, int $workerId): void
|
||||||
{
|
{
|
||||||
@@ -99,8 +95,6 @@ class OnServerWorker extends \Kiri\Server\Abstracts\Server
|
|||||||
* @param int $worker_pid
|
* @param int $worker_pid
|
||||||
* @param int $exit_code
|
* @param int $exit_code
|
||||||
* @param int $signal
|
* @param int $signal
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function onWorkerError(Server $server, int $worker_id, int $worker_pid, int $exit_code, int $signal): void
|
public function onWorkerError(Server $server, int $worker_id, int $worker_pid, int $exit_code, int $signal): void
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ use Kiri\Di\Context;
|
|||||||
use Kiri\Router\Router;
|
use Kiri\Router\Router;
|
||||||
use Kiri\Server\Abstracts\BaseProcess;
|
use Kiri\Server\Abstracts\BaseProcess;
|
||||||
use Kiri\Server\Events\OnWorkerStart;
|
use Kiri\Server\Events\OnWorkerStart;
|
||||||
use ReflectionException;
|
|
||||||
use Swoole\Coroutine;
|
use Swoole\Coroutine;
|
||||||
use Swoole\Event;
|
use Swoole\Event;
|
||||||
use Swoole\Process;
|
use Swoole\Process;
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ use Kiri\Events\EventDispatch;
|
|||||||
use Kiri\Router\Router;
|
use Kiri\Router\Router;
|
||||||
use Kiri\Server\Abstracts\AsyncServer;
|
use Kiri\Server\Abstracts\AsyncServer;
|
||||||
use Kiri\Server\Events\OnShutdown;
|
use Kiri\Server\Events\OnShutdown;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Symfony\Component\Console\Command\Command;
|
use Symfony\Component\Console\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
@@ -67,8 +65,6 @@ class ServerCommand extends Command
|
|||||||
* @param InputInterface $input
|
* @param InputInterface $input
|
||||||
* @param OutputInterface $output
|
* @param OutputInterface $output
|
||||||
* @return int
|
* @return int
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function execute(InputInterface $input, OutputInterface $output): int
|
public function execute(InputInterface $input, OutputInterface $output): int
|
||||||
@@ -86,8 +82,6 @@ class ServerCommand extends Command
|
|||||||
/**
|
/**
|
||||||
* @param InputInterface $input
|
* @param InputInterface $input
|
||||||
* @return int
|
* @return int
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
protected function restart(InputInterface $input): int
|
protected function restart(InputInterface $input): int
|
||||||
@@ -100,8 +94,6 @@ class ServerCommand extends Command
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,12 +5,8 @@ namespace Kiri\Server\Task;
|
|||||||
|
|
||||||
use Kiri;
|
use Kiri;
|
||||||
use Kiri\Server\Constant;
|
use Kiri\Server\Constant;
|
||||||
use Kiri\Server\ServerInterface;
|
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Swoole\Server;
|
use Swoole\Server;
|
||||||
use Kiri\Di\Inject\Container;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -40,8 +36,6 @@ class Task
|
|||||||
* @param int $task_id
|
* @param int $task_id
|
||||||
* @param mixed $data
|
* @param mixed $data
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
public function onFinish(Server $server, int $task_id, mixed $data): void
|
public function onFinish(Server $server, int $task_id, mixed $data): void
|
||||||
|
|||||||
Reference in New Issue
Block a user