net.go 522 B

1234567891011121314
  1. // Package net is a drop-in replacement to Golang's net package, with some more functionalities.
  2. package net // import "github.com/xtls/xray-core/common/net"
  3. import "time"
  4. // defines the maximum time an idle TCP session can survive in the tunnel, so
  5. // it should be consistent across HTTP versions and with other transports.
  6. const ConnIdleTimeout = 300 * time.Second
  7. // consistent with quic-go
  8. const QuicgoH3KeepAlivePeriod = 10 * time.Second
  9. // consistent with chrome
  10. const ChromeH2KeepAlivePeriod = 45 * time.Second