| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace App\Module\AppGame\Events;
- use Illuminate\Broadcasting\InteractsWithSockets;
- use Illuminate\Foundation\Events\Dispatchable;
- use Illuminate\Queue\SerializesModels;
- use Uraus\Kku\Response;
- /**
- * Protobuf响应事件
- *
- * 当Protobuf响应返回前触发此事件,允许其他系统在响应返回前进行处理或修改。
- * 此事件可用于记录响应日志、修改响应内容、添加额外数据等操作。
- */
- class ProtobufResponseEvent
- {
- use Dispatchable, InteractsWithSockets, SerializesModels;
- /**
- * 响应对象
- *
- * @var Response
- */
- public Response $response;
- /**
- * 创建一个新的事件实例
- *
- * @param Response $response Protobuf响应对象
- * @return void
- */
- public function __construct(Response $response)
- {
- $this->response = $response;
- }
- }
|