新TAP测试(TODO 解析arp)
This commit is contained in:
parent
5861f07251
commit
63f0bd017a
|
@ -134,7 +134,7 @@ func NewNetTunnel() *NetTunnel {
|
|||
client := v.(*RPCClient)
|
||||
client.CheckConnect()
|
||||
client.Push(frame)
|
||||
log.Println(len(frame))
|
||||
// log.Println(len(frame))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,17 @@ func (cli *RPCClient) run() {
|
|||
if len(cli.Frames) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
Compress(buf, cli.Frames)
|
||||
|
||||
if len(cli.Frames) >= 1000 {
|
||||
var countbuf = 0
|
||||
for _, frame := range cli.Frames {
|
||||
countbuf += len(frame)
|
||||
}
|
||||
log.Printf("src size: %d compressed size: %d", countbuf, len(buf.Bytes()))
|
||||
}
|
||||
|
||||
cli.Frames = cli.Frames[:0]
|
||||
return true
|
||||
}) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user