AddressInfo.cs 905 B

123456789101112131415161718192021222324252627282930313233343536
  1. namespace XGame.Framework.Network
  2. {
  3. public enum ProtocolType
  4. {
  5. NONE = 1 << 0,
  6. TCP = 1 << 1,
  7. HTTP = 1 << 2,
  8. HTTPS = 1 << 3,
  9. WS = 1 << 4,
  10. WSS = 1 << 5
  11. }
  12. public class AddressInfo
  13. {
  14. /// <summary>
  15. /// IP或域名 e.g. 192.168.13.111 or xxxx.com
  16. /// </summary>
  17. public string Address { get; set; }
  18. /// <summary>
  19. /// 端口号
  20. /// </summary>
  21. public int Port { get; set; }
  22. /// <summary>
  23. /// 协议类型
  24. /// </summary>
  25. public ProtocolType ProtocolType { get; set; }
  26. /// <summary>
  27. /// 优先级
  28. /// </summary>
  29. public int Priority { get; set; }
  30. /// <summary>
  31. /// 用户自定义Uri,默认Uri为(Address + Port)
  32. /// </summary>
  33. public string Uri { get; set; }
  34. }
  35. }