feat(socket): 修改端口并优化 Socket 服务器功能
- 修改 launch.json 中的端口设置,将 30000 改为 27777 - 在 ServerEvent.go 中添加 OnClose 方法,处理客户端断开连接的情况 - 在 main.go 中启用 CORS 支持 - 在 middleware.go 中注释掉 socket.ReadLoop 的调用
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -19,7 +19,7 @@
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": ["-port=30000"],
|
||||
"args": ["-port=27777"],
|
||||
"program": "${workspaceFolder}/logic"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user