io.Copy use pool buffer

This commit is contained in:
fatedier
2017-06-06 18:48:40 +08:00
parent 1eaf17fd05
commit 511503d34c
10 changed files with 93 additions and 126 deletions

View File

@ -23,8 +23,8 @@ import (
"strings"
"sync"
"github.com/fatedier/frp/models/proto/tcp"
"github.com/fatedier/frp/utils/errors"
frpIo "github.com/fatedier/frp/utils/io"
frpNet "github.com/fatedier/frp/utils/net"
)
@ -177,7 +177,7 @@ func (hp *HttpProxy) ConnectHandler(rw http.ResponseWriter, req *http.Request) {
}
client.Write([]byte("HTTP/1.0 200 OK\r\n\r\n"))
go tcp.Join(remote, client)
go frpIo.Join(remote, client)
}
func (hp *HttpProxy) Auth(rw http.ResponseWriter, req *http.Request) bool {