Compare commits
2 Commits
7282835430
...
6a93dc60a7
Author | SHA1 | Date | |
---|---|---|---|
|
6a93dc60a7 | ||
|
5d6ca43c97 |
|
@ -41,9 +41,10 @@ func queueHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
|
|
||||||
log.Println("建立连接", DequeueHandler.RefCountAdd(1))
|
raddr := conn.RemoteAddr()
|
||||||
|
log.Printf("%s 建立连接 当前unity处理机器数量 %d", raddr, DequeueHandler.RefCountAdd(1))
|
||||||
defer func() {
|
defer func() {
|
||||||
log.Println("退出连接", DequeueHandler.RefCountAdd(-1))
|
log.Printf("%s 退出连接 当前unity处理机器数量 %d", raddr, DequeueHandler.RefCountAdd(-1))
|
||||||
}()
|
}()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
@ -86,7 +87,7 @@ func queueHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打印消息
|
// 打印消息
|
||||||
fmt.Printf("%s 的数据 推送到unity. source %s\n", conn.RemoteAddr(), item.Source)
|
fmt.Printf("%s 的数据 推送到unity. source: [%s]\n", conn.RemoteAddr(), item.Source)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user