1.优化websocket连接

2.修复游戏实施对局显示错误
This commit is contained in:
2026-04-24 16:53:00 +08:00
parent 203e478b65
commit d9b574676b
11 changed files with 67 additions and 145 deletions

View File

@@ -10,7 +10,7 @@ use support\Response;
use Webman\Http\Request as WebmanRequest;
/**
* WebSocket 测试状态流period.tick / period.opened
* WebSocket test for period status stream.
*/
class GameCurrentStatus extends Backend
{
@@ -35,8 +35,8 @@ class GameCurrentStatus extends Backend
return $this->success('', [
'name' => 'ws.period',
'ws_url' => WebSocketConfigHelper::wsUrl(),
'connect_tip' => '连接成功后会自动订阅下列主题;也可在「发送消息」中手动改订阅。未订阅时不会收到业务推送。',
'ws_url' => WebSocketConfigHelper::wsUrl($request),
'connect_tip' => 'After connected, topics are auto-subscribed. You can also send subscribe manually.',
'subscribe_topics' => $subscribeTopics,
'sample_messages' => [
'{"action":"ping"}',