Merge pull request #496 from fatedier/0.14

xtcp for p2p communication
This commit is contained in:
fatedier authored and GitHub committed 2017-10-24 13:54:32 -05:00
commit 673047be2c
67 files changed
+7988 -34

No files matched your search

+5 -1
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)
}