1. 完善websocket通信逻辑

2. 实现Switch接口
This commit is contained in:
2025-09-08 14:59:42 +08:00
parent a6ee1013ca
commit 6a2d97b543
7 changed files with 499 additions and 19 deletions

View File

@@ -77,6 +77,8 @@ func NewApplication(cfg *config.Config) *Application {
// 初始化WebSocket服务
websocketService := service.NewWebSocketService()
// 设置WebSocket超时时间
websocketService.SetDefaultTimeout(cfg.GetWebSocketTimeout())
// 初始化API组件
apiInstance := api.NewAPI(cfg, userRepo, operationHistoryRepo, deviceControlRepo, deviceRepo, websocketService)