1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-17 18:06:15 -05:00
v2fly/transport/config.go

21 lines
355 B
Go
Raw Normal View History

2016-06-01 19:49:25 -04:00
package transport
2016-06-11 07:51:02 -04:00
import "github.com/v2ray/v2ray-core/transport/hub/kcpv"
2016-06-02 14:52:52 -04:00
type Config struct {
2016-06-01 19:49:25 -04:00
ConnectionReuse bool
2016-06-11 07:51:02 -04:00
enableKcp bool
kcpConfig *kcpv.Config
2016-06-01 19:49:25 -04:00
}
2016-06-02 14:52:52 -04:00
func (this *Config) Apply() error {
if this.ConnectionReuse {
connectionReuse = true
}
2016-06-11 07:51:02 -04:00
enableKcp = this.enableKcp
if enableKcp {
KcpConfig = this.kcpConfig
}
2016-06-02 14:52:52 -04:00
return nil
2016-06-01 19:49:25 -04:00
}