/// <summary> /// Send a control packet (reliable, in-order) to the given set of destinations. /// Remove peers from the connections list if you send to them and then call base with the rest. /// </summary> /// <param name="connections"></param> /// <param name="packet"></param> public virtual void SendReliable([NotNull] List <TPeer> connections, ArraySegment <byte> packet) { if (connections == null) { throw new ArgumentNullException("connections"); } SentTraffic.Update(packet.Count * connections.Count); for (var i = 0; i < connections.Count; i++) { SendReliable(connections[i], packet); } }
void IServer <TPeer> .SendReliable(TPeer connection, ArraySegment <byte> packet) { SentTraffic.Update(packet.Count); SendReliable(connection, packet); }