utils_windows.go 402 B

123456789101112
  1. //go:build windows
  2. // +build windows
  3. package chat
  4. func getMaximumConcurrentConnectionLimit() uint64 {
  5. // The maximum limit I can find for windows is 16,777,216
  6. // (essentially unlimited, but add the 0.7 multiplier as well to be
  7. // consistent with other systems)
  8. // https://docs.microsoft.com/en-gb/archive/blogs/markrussinovich/pushing-the-limits-of-windows-handles
  9. return (16777216 * 7) / 10
  10. }