jellyfin/MediaBrowser.Model/Net/IpEndPointInfo.cs

31 lines
656 B
C#
Raw Normal View History

2016-11-04 09:31:05 +01:00
using System;
2016-11-08 19:44:23 +01:00
using System.Globalization;
2016-11-04 09:31:05 +01:00
namespace MediaBrowser.Model.Net
{
public class IpEndPointInfo
{
public IpAddressInfo IpAddress { get; set; }
public int Port { get; set; }
2016-11-08 19:44:23 +01:00
public IpEndPointInfo()
{
}
public IpEndPointInfo(IpAddressInfo address, int port)
{
IpAddress = address;
Port = port;
}
2016-11-04 09:31:05 +01:00
public override string ToString()
{
var ipAddresString = IpAddress == null ? string.Empty : IpAddress.ToString();
2016-11-08 19:44:23 +01:00
return ipAddresString + ":" + Port.ToString(CultureInfo.InvariantCulture);
2016-11-04 09:31:05 +01:00
}
}
}