1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-03 06:30:42 +00:00
v2fly/transport/internet/kcp/config.go

24 lines
351 B
Go
Raw Normal View History

2016-06-14 20:54:08 +00:00
package kcp
2016-06-11 09:30:38 +00:00
type Config struct {
2016-06-20 09:06:27 +00:00
Mtu int // Maximum transmission unit
Sndwnd int // Sending window size
Rcvwnd int // Receiving window size
2016-06-11 09:30:38 +00:00
}
2016-06-14 20:54:08 +00:00
func (this *Config) Apply() {
effectiveConfig = *this
2016-06-11 09:30:38 +00:00
}
2016-06-14 20:54:08 +00:00
2016-06-17 14:57:48 +00:00
func DefaultConfig() Config {
return Config{
2016-06-20 09:06:27 +00:00
Mtu: 1350,
Sndwnd: 1024,
Rcvwnd: 1024,
2016-06-14 20:54:08 +00:00
}
2016-06-17 14:57:48 +00:00
}
var (
effectiveConfig = DefaultConfig()
2016-06-14 20:54:08 +00:00
)