public void MulticastMessage(string name, int msgId, byte[] msgBytes) { if (networkDic.Count > 0) { return; } if (networkDic.TryGetValue(name, out var network)) { if (network.IsStarted) { network.MulticastMessage(msgId, msgBytes); } else { NetLogger.Warning(LOG_TAG, $"The server({name}) is not started"); } } }
public void MulticastMessage(int msgId, byte[] msgBytes) { if (networkDic.Count == 0) { return; } foreach (var kvp in networkDic) { if (kvp.Value.IsStarted) { kvp.Value.MulticastMessage(msgId, msgBytes); } else { NetLogger.Warning(LOG_TAG, $"The server({kvp.Key}) is not started"); } } }