改名
This commit is contained in:
@@ -2,37 +2,62 @@
|
||||
|
||||
namespace Server\Manager;
|
||||
|
||||
class ServerBase
|
||||
use Server\Abstracts\Server;
|
||||
use Server\Constant;
|
||||
|
||||
|
||||
/**
|
||||
* Class ServerBase
|
||||
* @package Server\Manager
|
||||
*/
|
||||
class ServerBase extends Server
|
||||
{
|
||||
|
||||
|
||||
public function onStart()
|
||||
/**
|
||||
* @param \Swoole\Server $server
|
||||
*/
|
||||
public function onStart(\Swoole\Server $server)
|
||||
{
|
||||
var_dump(func_get_args());
|
||||
$this->runEvent(Constant::START, null, [$server]);
|
||||
}
|
||||
|
||||
|
||||
public function onShutdown()
|
||||
/**
|
||||
* @param \Swoole\Server $server
|
||||
*/
|
||||
public function onShutdown(\Swoole\Server $server)
|
||||
{
|
||||
var_dump(func_get_args());
|
||||
$this->runEvent(Constant::SHUTDOWN, null, [$server]);
|
||||
}
|
||||
|
||||
|
||||
public function onPipeMessage()
|
||||
/**
|
||||
* @param \Swoole\Server $server
|
||||
* @param int $src_worker_id
|
||||
* @param mixed $message
|
||||
*/
|
||||
public function onPipeMessage(\Swoole\Server $server, int $src_worker_id, mixed $message)
|
||||
{
|
||||
|
||||
$this->runEvent(Constant::PIPE_MESSAGE, null, [$server, $src_worker_id, $message]);
|
||||
}
|
||||
|
||||
|
||||
public function onBeforeReload()
|
||||
/**
|
||||
* @param \Swoole\Server $server
|
||||
*/
|
||||
public function onBeforeReload(\Swoole\Server $server)
|
||||
{
|
||||
|
||||
$this->runEvent(Constant::PIPE_MESSAGE, null, [$server]);
|
||||
}
|
||||
|
||||
|
||||
public function onAfterReload()
|
||||
/**
|
||||
* @param \Swoole\Server $server
|
||||
*/
|
||||
public function onAfterReload(\Swoole\Server $server)
|
||||
{
|
||||
|
||||
$this->runEvent(Constant::PIPE_MESSAGE, null, [$server]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user