internal void Remove(OuterEndPointMessage message) { if (!this.HCodeMapChannel.TryGetValue(message.GetHashCode(), out Network network)) { return; } this.ClientConnectionNumbers.Remove(network.Channel.Id); this.HCodeMapChannel.Remove(message.GetHashCode()); this.NetworkMapMessages.Remove(network.Channel.Id); }
internal void Add(Network network, OuterEndPointMessage message) { if (ClientConnectionNumbers.ContainsKey(network.Id)) { return; } this.ClientConnectionNumbers[network.Id] = 0; this.ConnectEntities.Add(message); this.NetworkMapMessages[network.Id] = message; this.HCodeMapChannel[message.GetHashCode()] = network; }
/// <returns></returns> private bool TryGetFromChannelId(Network network, out OuterEndPointMessage message) { return(this.NetworkMapMessages.TryGetValue(network.Id, out message)); }