变更
This commit is contained in:
@@ -89,15 +89,17 @@ class AsyncServer implements ServerInterface
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return bool
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ContainerExceptionInterface
|
||||||
* @throws NotFoundExceptionInterface|ReflectionException
|
* @throws NotFoundExceptionInterface|ReflectionException
|
||||||
*/
|
*/
|
||||||
public function shutdown(): void
|
public function shutdown(): bool
|
||||||
{
|
{
|
||||||
$this->server->shutdown();
|
$this->server->shutdown();
|
||||||
|
|
||||||
$this->dispatch->dispatch(new OnShutdown());
|
$this->dispatch->dispatch(new OnShutdown());
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ interface OnReceiveInterface
|
|||||||
* @param string $data
|
* @param string $data
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function onReceive(Server $server, int $fd, int $reactor_id, string $data): void;
|
public function onReceive(Server $server, int $fd, int $reactor_id, string $data): bool;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class OnServerManager extends Server
|
|||||||
* @param \Swoole\Server $server
|
* @param \Swoole\Server $server
|
||||||
* @throws ConfigException
|
* @throws ConfigException
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ContainerExceptionInterface
|
||||||
* @throws NotFoundExceptionInterface
|
* @throws NotFoundExceptionInterface|ReflectionException
|
||||||
*/
|
*/
|
||||||
public function onManagerStart(\Swoole\Server $server)
|
public function onManagerStart(\Swoole\Server $server)
|
||||||
{
|
{
|
||||||
@@ -46,10 +46,12 @@ class OnServerManager extends Server
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \Swoole\Server $server
|
* @param \Swoole\Server $server
|
||||||
|
* @return void
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ContainerExceptionInterface
|
||||||
* @throws NotFoundExceptionInterface
|
* @throws NotFoundExceptionInterface
|
||||||
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
public function onManagerStop(\Swoole\Server $server)
|
public function onManagerStop(\Swoole\Server $server): void
|
||||||
{
|
{
|
||||||
$this->dispatch->dispatch(new OnManagerStop($server));
|
$this->dispatch->dispatch(new OnManagerStop($server));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user