This commit is contained in:
2020-09-04 00:41:33 +08:00
parent 622071256e
commit 46f9de1f6a
141 changed files with 105 additions and 73 deletions
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace HttpServer\Service;
use HttpServer\Service\Abstracts\Tcp;
use ReflectionException;
use Snowflake\Exception\NotFindClassException;
/**
* Class Receive
* @package HttpServer\Events
*/
class Receive extends Tcp
{
/**
* @throws ReflectionException
* @throws NotFindClassException
*/
public function onInit()
{
$this->onHandlerListener();
$this->onBaseListener();
}
/**
* @throws NotFindClassException
* @throws ReflectionException
*/
public function onBaseListener()
{
$this->on('connect', $this->createHandler('connect'));
$this->on('receive', $this->createHandler('receive'));
$this->on('close', $this->createHandler('close'));
}
}