初始化代码

This commit is contained in:
2025-12-22 14:34:25 +08:00
parent c2c5ae2fdd
commit a77dbc743f
1510 changed files with 213008 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace think\swoole\contract\rpc;
use think\swoole\rpc\Protocol;
interface ParserInterface
{
const EOF = "\r\n\r\n";
/**
* @param Protocol $protocol
*
* @return string
*/
public function encode(Protocol $protocol): string;
/**
* @param string $string
*
* @return Protocol
*/
public function decode(string $string): Protocol;
/**
* @param string $string
*
* @return mixed
*/
public function decodeResponse(string $string);
/**
* @param mixed $result
*
* @return string
*/
public function encodeResponse($result): string;
}