新TAP测试(TODO 解析arp)
This commit is contained in:
parent
5861f07251
commit
63f0bd017a
@ -134,7 +134,7 @@ func NewNetTunnel() *NetTunnel {
|
|||||||
client := v.(*RPCClient)
|
client := v.(*RPCClient)
|
||||||
client.CheckConnect()
|
client.CheckConnect()
|
||||||
client.Push(frame)
|
client.Push(frame)
|
||||||
log.Println(len(frame))
|
// log.Println(len(frame))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +113,17 @@ func (cli *RPCClient) run() {
|
|||||||
if len(cli.Frames) == 0 {
|
if len(cli.Frames) == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
Compress(buf, cli.Frames)
|
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]
|
cli.Frames = cli.Frames[:0]
|
||||||
return true
|
return true
|
||||||
}) {
|
}) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user