config.go 373 B

1234567891011121314151617181920212223242526272829
  1. package config
  2. import (
  3. "net"
  4. )
  5. const (
  6. MdnsIPv4 = "224.0.0.251"
  7. MdnsIPv6 = "ff02::fb"
  8. MdnsPort = 5353
  9. ForceUnicast = false
  10. DefaultTTL = 120
  11. BufSize = 65536
  12. BufReadDeadline = 2
  13. )
  14. var (
  15. MdnsIPv4Addr = &net.UDPAddr{
  16. IP: net.ParseIP(MdnsIPv4),
  17. Port: MdnsPort,
  18. }
  19. MdnsIPv6Addr = &net.UDPAddr{
  20. IP: net.ParseIP(MdnsIPv6),
  21. Port: MdnsPort,
  22. }
  23. )