2016-12-22 18:30:46 -05:00
|
|
|
package websocket
|
2016-08-13 09:44:36 -04:00
|
|
|
|
2016-10-02 17:43:58 -04:00
|
|
|
import (
|
|
|
|
v2net "v2ray.com/core/common/net"
|
|
|
|
"v2ray.com/core/transport/internet"
|
2016-08-13 09:44:36 -04:00
|
|
|
)
|
2016-10-02 17:43:58 -04:00
|
|
|
|
2016-11-27 15:39:09 -05:00
|
|
|
func (v *ConnectionReuse) IsEnabled() bool {
|
|
|
|
if v == nil {
|
2016-10-17 08:35:13 -04:00
|
|
|
return false
|
|
|
|
}
|
2016-11-27 15:39:09 -05:00
|
|
|
return v.Enable
|
2016-10-17 08:35:13 -04:00
|
|
|
}
|
|
|
|
|
2016-10-02 17:43:58 -04:00
|
|
|
func init() {
|
2016-10-16 08:22:21 -04:00
|
|
|
internet.RegisterNetworkConfigCreator(v2net.Network_WebSocket, func() interface{} {
|
2016-10-02 17:43:58 -04:00
|
|
|
return new(Config)
|
|
|
|
})
|
|
|
|
}
|