|
@@ -307,7 +307,7 @@ func (h *Hub) sendRequest(gd *GetData) (count int, err error) {
|
|
|
conn: line,
|
|
conn: line,
|
|
|
}
|
|
}
|
|
|
if h.cf.PrintMsg {
|
|
if h.cf.PrintMsg {
|
|
|
- log.Println("[SEND]->", id, line.channel, "["+gd.Cmd+"]", subStr(string(outData), 200))
|
|
|
|
|
|
|
+ log.Println("[SEND]->", "["+gd.Cmd+"]", id, line.channel, subStr(string(outData), 200))
|
|
|
}
|
|
}
|
|
|
count++
|
|
count++
|
|
|
if gd.Max > 0 && count >= gd.Max {
|
|
if gd.Max > 0 && count >= gd.Max {
|
|
@@ -351,7 +351,7 @@ func (h *Hub) requestFromNet(request *RequestData) {
|
|
|
cmd := request.Cmd
|
|
cmd := request.Cmd
|
|
|
channel := request.conn.channel
|
|
channel := request.conn.channel
|
|
|
if h.cf.PrintMsg {
|
|
if h.cf.PrintMsg {
|
|
|
- log.Println("[REQU]<-", request.Id, channel, "["+cmd+"]", subStr(string(request.Data), 200))
|
|
|
|
|
|
|
+ log.Println("[REQU]<-", "["+cmd+"]", request.Id, channel, subStr(string(request.Data), 200))
|
|
|
}
|
|
}
|
|
|
// 执行中间件
|
|
// 执行中间件
|
|
|
for _, mdFunc := range h.middle {
|
|
for _, mdFunc := range h.middle {
|
|
@@ -409,7 +409,7 @@ func (h *Hub) requestFromNet(request *RequestData) {
|
|
|
Data: byteData,
|
|
Data: byteData,
|
|
|
}
|
|
}
|
|
|
if h.cf.PrintMsg {
|
|
if h.cf.PrintMsg {
|
|
|
- log.Println("[RESP]->", request.Id, channel, "["+cmd+"]", state, subStr(string(byteData), 200))
|
|
|
|
|
|
|
+ log.Println("[RESP]->", "["+cmd+"]", request.Id, channel, state, subStr(string(byteData), 200))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return
|
|
return
|
|
@@ -467,7 +467,7 @@ func (h *Hub) GetWithStruct(gd *GetData, backFunc GetBackFunc) (count int, err e
|
|
|
}
|
|
}
|
|
|
ch := rp.conn.channel
|
|
ch := rp.conn.channel
|
|
|
if h.cf.PrintMsg {
|
|
if h.cf.PrintMsg {
|
|
|
- log.Println("[RECV]<-", rp.Id, ch, "["+gd.Cmd+"]", rp.State, subStr(string(rp.Data), 200))
|
|
|
|
|
|
|
+ log.Println("[RECV]<-", "["+gd.Cmd+"]", rp.Id, ch, rp.State, subStr(string(rp.Data), 200))
|
|
|
}
|
|
}
|
|
|
count++
|
|
count++
|
|
|
// 如果这里返回为false这跳出循环
|
|
// 如果这里返回为false这跳出循环
|