jellyfin/MediaBrowser.Model/Net/IpEndPointInfo.cs

31 lines
656 B
C#
Raw Normal View History

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