mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 23:55:35 +08:00
23 lines
527 B
PHP
23 lines
527 B
PHP
|
|
<?php /** @noinspection PhpUnusedParameterInspection */
|
||
|
|
|
||
|
|
|
||
|
|
namespace ZM\Event\SwooleEvent;
|
||
|
|
|
||
|
|
|
||
|
|
use Swoole\Server;
|
||
|
|
use ZM\Annotation\Swoole\SwooleHandler;
|
||
|
|
use ZM\Event\SwooleEvent;
|
||
|
|
use ZM\Utils\ProcessManager;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Class OnPipeMessage
|
||
|
|
* @package ZM\Event\SwooleEvent
|
||
|
|
* @SwooleHandler("PipeMessage")
|
||
|
|
*/
|
||
|
|
class OnPipeMessage implements SwooleEvent
|
||
|
|
{
|
||
|
|
public function onCall(Server $server, $src_worker_id, $data) {
|
||
|
|
$data = json_decode($data, true);
|
||
|
|
ProcessManager::workerAction($src_worker_id, $data);
|
||
|
|
}
|
||
|
|
}
|