Tune socket options

This commit is contained in:
9seconds
2018-06-24 17:16:11 +03:00
parent 468f83bbb1
commit 3dd6de8cea
7 changed files with 59 additions and 87 deletions
+5 -3
View File
@@ -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
},
}