mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
unix: support udp forwarding (#194)
This commit is contained in:
1 parent
63112a1509
commit
142865535e
10 files changed
+259
-111
No files matched your search
+3
-2
@@ -24,8 +24,8 @@ type KCP struct {
|
||||
|
||||
key string
|
||||
crypt string
|
||||
mode string
|
||||
block kcp.BlockCrypt
|
||||
mode string
|
||||
|
||||
dataShards int
|
||||
parityShards int
|
||||
@@ -258,7 +258,8 @@ func (s *KCP) setParams(c *kcp.UDPSession) {
|
||||
c.SetNoDelay(1, 20, 2, 1)
|
||||
case "fast3":
|
||||
c.SetNoDelay(1, 10, 2, 1)
|
||||
default: // default use fast
|
||||
default:
|
||||
log.F("[kcp] unkonw mode: %s, use fast mode instead", s.mode)
|
||||
c.SetNoDelay(0, 30, 2, 1)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user