Files
kiri-core/Server/Manager/ServerManager.php
T
as2252258@163.com d56c2bba9e modify
2021-07-26 03:18:09 +08:00

39 lines
667 B
PHP

<?php
namespace Server\Manager;
use Server\Abstracts\Server;
use Server\Constant;
/**
* Class ServerManager
* @package Server\Manager
*/
class ServerManager extends Server
{
/**
* @param \Swoole\Server $server
* @throws \Snowflake\Exception\ConfigException
*/
public function onManagerStart(\Swoole\Server $server)
{
$this->setProcessName(sprintf('manger[%d].0', $server->manager_pid));
$this->runEvent(Constant::MANAGER_START, null, [$server]);
}
/**
* @param \Swoole\Server $server
*/
public function onManagerStop(\Swoole\Server $server)
{
$this->runEvent(Constant::MANAGER_STOP, null, [$server]);
}
}