Files
2023-12-14 19:00:47 +01:00

25 lines
671 B
C#

namespace HyperbolicDownloaderApi.Networking;
public class NetworkSocket(string ipAddress, int port, DateTime lastActive)
{
public string IPAddress { get; set; } = ipAddress;
public int Port { get; set; } = port;
public DateTime LastActive { get; set; } = lastActive;
public long DownloadSpeed { get; set; }
public override bool Equals(object? obj)
{
if (obj is not NetworkSocket networkSocket)
{
return false;
}
return networkSocket.IPAddress == IPAddress && networkSocket.Port == Port;
}
public override int GetHashCode()
{
return HashCode.Combine(IPAddress, Port);
}
}