public void NotifyClients(uint sessionId, ServerInfoBase info) { var serverName = ""; if (info is WorldServerInfo) serverName = "WorldServer"; else if (info is WorldNodeInfo) serverName = "NodeServer"; if (info == null) { if (Servers.TryRemove(sessionId, out info)) Log.Message($"{serverName} (Realm: {info.RealmId}, Host: {info.IPAddress}, Port: {info.Port}) disconnected."); } else { var status = "connected"; if (Servers.ContainsKey(sessionId)) status = "updated"; Servers.AddOrUpdate(sessionId, info, (k, v) => info); Log.Message($"{serverName} (Host: {info.IPAddress}, Port: {info.Port}, Connections: {info.ActiveConnections}) {status}."); } }
public bool Compare(ServerInfoBase info) { return RealmId == info.RealmId && IPAddress == info.IPAddress && Port == info.Port; }
public void Register(ServerInfoBase info) { proxy.Register(info); }
public void Update(ServerInfoBase info) { proxy.Update(info); }
public bool Compare(ServerInfoBase info) { return(RealmId == info.RealmId && IPAddress == info.IPAddress && Port == info.Port); }