Files
kiri-core/HttpServer/Service/Packet.php
T
as2252258@163.com 12d547c1a2 modify
2021-07-11 03:57:25 +08:00

41 lines
602 B
PHP

<?php
declare(strict_types=1);
namespace HttpServer\Service;
use HttpServer\Service\Abstracts\Tcp;
use ReflectionException;
use Snowflake\Exception\NotFindClassException;
/**
* Class OnPacket
* @package HttpServer\Events
*/
class Packet extends Tcp
{
/**
* @throws ReflectionException
* @throws NotFindClassException
*/
public function onInit()
{
$this->onHandlerListener();
$this->onBaseListener();
}
/**
* @throws NotFindClassException
* @throws ReflectionException
*/
public function onBaseListener()
{
$this->on('packet', $this->createHandler('packet'));
}
}