1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 18:00:43 +00:00
v2fly/transport/transport.go
2016-06-02 01:49:25 +02:00

23 lines
413 B
Go

package transport
import "github.com/v2ray/v2ray-core/common/log"
var (
TCPStreamConfig = &TCPConfig{
ConnectionReuse: false,
}
)
func ApplyConfig(config *Config) error {
if config.StreamType == StreamTypeTCP {
if config.TCPConfig != nil {
TCPStreamConfig = config.TCPConfig
if config.TCPConfig.ConnectionReuse {
log.Info("Transport: TCP connection reuse enabled.")
}
}
}
return nil
}