mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 22:04:02 +03:00
Tune socket options
This commit is contained in:
+5
-3
@@ -1,15 +1,17 @@
|
||||
package proxy
|
||||
|
||||
import "sync"
|
||||
import (
|
||||
"sync"
|
||||
|
||||
const copyBufferSize = 30 * 1024
|
||||
"github.com/9seconds/mtg/config"
|
||||
)
|
||||
|
||||
var copyPool sync.Pool
|
||||
|
||||
func init() {
|
||||
copyPool = sync.Pool{
|
||||
New: func() interface{} {
|
||||
data := make([]byte, copyBufferSize)
|
||||
data := make([]byte, config.BufferSizeCopy)
|
||||
return &data
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user