IpEndPointInfo.cs 656 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Globalization;
  3. namespace MediaBrowser.Model.Net
  4. {
  5. public class IpEndPointInfo
  6. {
  7. public IpAddressInfo IpAddress { get; set; }
  8. public int Port { get; set; }
  9. public IpEndPointInfo()
  10. {
  11. }
  12. public IpEndPointInfo(IpAddressInfo address, int port)
  13. {
  14. IpAddress = address;
  15. Port = port;
  16. }
  17. public override string ToString()
  18. {
  19. var ipAddresString = IpAddress == null ? string.Empty : IpAddress.ToString();
  20. return ipAddresString + ":" + Port.ToString(CultureInfo.InvariantCulture);
  21. }
  22. }
  23. }