feat: 实现TCP Server

This commit is contained in:
zimoyin
2026-03-02 21:59:43 +08:00
parent 043306819b
commit a79dfae57d
144 changed files with 15785 additions and 140 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace app\net\parsers;
/**
* 报文解析器接口
*/
interface PacketParserInterface
{
/**
* 判断当前解析器是否支持该报文
* @param string $hexString 十六进制字符串
* @return bool
*/
public function supports(string $hexString): bool;
/**
* 解析报文并返回填充好的属性数组
* @param string $hexString 十六进制字符串
* @return array 解析后的属性数组(key为属性名,value为属性值)
*/
public function parse(string $hexString): array;
}