config.go 370 B

12345678910111213141516171819
  1. package websocket
  2. import (
  3. v2net "v2ray.com/core/common/net"
  4. "v2ray.com/core/transport/internet"
  5. )
  6. func (c *Config) IsConnectionReuse() bool {
  7. if c == nil || c.ConnectionReuse == nil {
  8. return false
  9. }
  10. return c.ConnectionReuse.Enable
  11. }
  12. func init() {
  13. internet.RegisterNetworkConfigCreator(v2net.Network_WebSocket, func() interface{} {
  14. return new(Config)
  15. })
  16. }