-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdebug_service.go
More file actions
22 lines (19 loc) · 804 Bytes
/
debug_service.go
File metadata and controls
22 lines (19 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package gouxp
import "github.com/shaoyuan1943/gokcp"
var logContents = `
kcp: %v
SendUNA: %v, SendNext: %v, RecvNext: %v,
LastACK: %v, Threshold: %v, RTO: %v,
FastResendACK: %v, FastACKLimit: %v,
SendWnd: %v, RecvWnd: %v, RemoteWnd: %v, Wnd: %v,
SendQueueLen: %v, SendBufferLen: %v, RecvQueueLen: %v, RecvBufferLen: %v, ACKListLen: %v, Incr: %v
`
func logKCPStatus(convID uint32, status *gokcp.KCPStatus) {
if logger != nil {
logger.Debugf(logContents, convID, status.SendUNA, status.SendNext, status.RecvNext, status.LastACK,
status.Threshold, status.RTO, status.FastResendACK, status.FastACKLimit,
status.SendWnd, status.RecvWnd, status.RemoteWnd, status.Wnd,
status.SendQueueLen, status.SendBufferLen, status.RecvQueueLen, status.RecvBufferLen,
status.ACKListLen, status.Incr)
}
}