1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-02-20 23:47:21 -05:00

20 lines
374 B
Go
Raw Normal View History

2016-06-14 22:54:08 +02:00
package tcp
2016-10-02 23:43:58 +02:00
import (
"v2ray.com/core/common"
2016-10-02 23:43:58 +02:00
"v2ray.com/core/transport/internet"
2016-06-14 22:54:08 +02:00
)
2016-10-02 23:43:58 +02:00
2017-01-01 21:19:12 +01:00
func (v *Config) IsConnectionReuse() bool {
if v == nil || v.ConnectionReuse == nil {
2016-10-17 14:35:13 +02:00
return true
}
2017-01-01 21:19:12 +01:00
return v.ConnectionReuse.Enable
2016-10-17 14:35:13 +02:00
}
2016-10-02 23:43:58 +02:00
func init() {
common.Must(internet.RegisterProtocolConfigCreator(internet.TransportProtocol_TCP, func() interface{} {
2016-10-02 23:43:58 +02:00
return new(Config)
}))
2016-10-02 23:43:58 +02:00
}