2021-11-03 15:17:52 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
2021-11-18 11:37:12 +08:00
|
|
|
namespace Server\Contract;
|
2021-11-03 15:17:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
use Swoole\Process;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Interface BaseProcess
|
2021-11-18 11:37:12 +08:00
|
|
|
* @package Contract
|
2021-11-03 15:17:52 +08:00
|
|
|
*/
|
|
|
|
|
interface OnProcessInterface
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param Process $process
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getProcessName(Process $process): string;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param Process $process
|
|
|
|
|
*/
|
|
|
|
|
public function signListen(Process $process): void;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param Process $process
|
|
|
|
|
*/
|
|
|
|
|
public function onHandler(Process $process): void;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public function onProcessStop(): void;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|