Merge pull request #496 from fatedier/0.14

xtcp for p2p communication
This commit is contained in:
fatedier
2017-10-24 13:54:32 -05:00
committed by GitHub
67 changed files with 7988 additions and 34 deletions

View File

@@ -20,7 +20,7 @@ import (
"github.com/fatedier/frp/utils/log"
kcp "github.com/xtaci/kcp-go"
kcp "github.com/fatedier/kcp-go"
)
type KcpListener struct {
@@ -85,3 +85,7 @@ func (l *KcpListener) Close() error {
}
return nil
}
func NewKcpConnFromUdp(conn *net.UDPConn, connected bool, raddr string) (net.Conn, error) {
return kcp.NewConnEx(1, connected, raddr, nil, 10, 3, conn)
}