using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Rssdp.Infrastructure { /// /// Cross platform representation of a UDP end point, being an IP address (either IPv4 or IPv6) and a port. /// public sealed class UdpEndPoint { /// /// The IP Address of the end point. /// /// /// Can be either IPv4 or IPv6, up to the code using this instance to determine which was provided. /// public string IPAddress { get; set; } /// /// The port of the end point. /// public int Port { get; set; } /// /// Returns the and values separated by a colon. /// /// A string containing :. public override string ToString() { return (this.IPAddress ?? String.Empty) + ":" + this.Port.ToString(); } } }