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