mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 15:18:31 +08:00
优化byte内存池
This commit is contained in:
@@ -102,7 +102,8 @@ func tunRead(ifce *water.Interface, cSess *sessdata.ConnSession) {
|
||||
|
||||
for {
|
||||
// data := make([]byte, BufferSize)
|
||||
data := getByteFull()
|
||||
hb := getByteFull()
|
||||
data := *hb
|
||||
n, err = ifce.Read(data)
|
||||
if err != nil {
|
||||
base.Error("tun Read err", n, err)
|
||||
@@ -121,6 +122,6 @@ func tunRead(ifce *water.Interface, cSess *sessdata.ConnSession) {
|
||||
return
|
||||
}
|
||||
|
||||
putByte(data)
|
||||
putByte(hb)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user