2021-07-17 02:16:49 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
2021-07-18 12:06:56 +08:00
|
|
|
namespace Server\SInterface;
|
2021-07-17 02:16:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
use Swoole\Process;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2021-10-19 16:23:55 +08:00
|
|
|
* Interface BaseProcess
|
2021-07-17 02:16:49 +08:00
|
|
|
* @package SInterface
|
|
|
|
|
*/
|
2021-09-24 02:23:24 +08:00
|
|
|
interface OnProcessInterface
|
2021-07-17 02:16:49 +08:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param Process $process
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getProcessName(Process $process): string;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param Process $process
|
|
|
|
|
*/
|
2021-08-19 15:22:48 +08:00
|
|
|
public function signListen(Process $process): void;
|
|
|
|
|
|
2021-07-17 02:16:49 +08:00
|
|
|
|
2021-08-19 15:22:48 +08:00
|
|
|
/**
|
|
|
|
|
* @param Process $process
|
|
|
|
|
*/
|
|
|
|
|
public function onHandler(Process $process): void;
|
2021-07-17 02:16:49 +08:00
|
|
|
|
|
|
|
|
|
2021-08-19 16:15:28 +08:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public function onProcessStop(): void;
|
|
|
|
|
|
|
|
|
|
|
2021-07-17 02:16:49 +08:00
|
|
|
}
|