This commit is contained in:
eson 2023-11-13 21:28:07 +08:00
parent 46e7a91719
commit 97970a5fb0

View File

@ -32,6 +32,9 @@ func HttpListen(ns *dragonboat.NodeHost, port int) {
}
func queueHandler(w http.ResponseWriter, r *http.Request) {
var count int
var err error
conn, err := upgrader.Upgrade(w, r, nil)
if err != nil {
@ -85,6 +88,8 @@ func queueHandler(w http.ResponseWriter, r *http.Request) {
stateClient.PushItem(nil, item)
return
}
count++
log.Println("count:", count)
// 打印消息
log.Printf("source: [%s] 数据 推送到unity [%s]\n", item.Source, raddr.String())