config.go 386 B

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