规则链

This commit is contained in:
XM-GO
2023-04-17 17:15:36 +08:00
parent 8b6f18ef6b
commit 9a7bab6cf3
10 changed files with 101 additions and 89 deletions

View File

@@ -2,6 +2,7 @@ package websocket
import (
"github.com/gorilla/websocket"
"log"
"pandax/pkg/global"
)
@@ -32,6 +33,7 @@ func RemoveWebSocket(screenId string) bool {
func SendMessage(message, screenId string) {
ws := GetWebSocketByScreenId(screenId)
if ws != nil {
log.Println("发送消息", message)
ws.Conn.WriteMessage(websocket.TextMessage, []byte(message))
}
}