1
0
mirror of synced 2024-11-12 00:40:51 +01:00
GC-local-server-rewrite/GCRelayServer/DictEntry.cs
2022-08-01 21:39:24 +08:00

23 lines
480 B
C#

using System.Net;
namespace GCRelayServer;
public class DictEntry
{
public List<EndPoint> EndPoints { get; set; } = new();
public DateTime LastAccessTime { get; set; } = DateTime.Now;
public void AddEndpoint(EndPoint endPoint, bool shouldClear = false)
{
if (shouldClear)
{
EndPoints.Clear();
}
if (EndPoints.Contains(endPoint))
{
return;
}
EndPoints.Add(endPoint);
}
}