public override bool Equals(object other) { if (!(other is HostData)) { return(false); } HostData player = (HostData)other; return(player.ip.Equals(this.ip) && player.port == this.port); }
public void AddHost(HostData host) { HostData data = FindByIp(host.Ip); if (data == null) { hostDic[host.ip] = host; } else { //update hostdata hostDic[host.ip] = host; } }
public void Remove(HostData host) { Remove(host.Ip); }