Files
kiri-core/system/Process/Leafleting.php
T

33 lines
421 B
PHP
Raw Normal View History

2020-08-31 01:27:08 +08:00
<?php
namespace Snowflake\Process;
use Exception;
use Snowflake\Snowflake;
2020-09-03 00:57:07 +08:00
use Swoole\Coroutine;
2020-08-31 01:27:08 +08:00
use Swoole\Timer;
/**
* Class Logfilemonitoring
*/
class Leafleting extends Process
{
/**
* @param \Swoole\Process $process
* @return mixed|void
* @throws Exception
*/
public function onHandler(\Swoole\Process $process)
{
2020-09-03 00:57:07 +08:00
while (true) {
2020-08-31 01:27:08 +08:00
var_dump($process->read());
2020-09-03 00:57:07 +08:00
Coroutine::sleep(1);
}
2020-08-31 01:27:08 +08:00
}
}