14 lines
470 B
C#
14 lines
470 B
C#
|
|
using System.Collections.Generic;
|
|
|
|
namespace Engine.Systems.Network;
|
|
|
|
public static class CommunicatorExtensions
|
|
{
|
|
public static void SendToClients<T>(this INetworkCommunicatorServer server, IEnumerable<IConnection> connections, T packet, PacketDelivery packetDelivery = PacketDelivery.ReliableInOrder) where T : class, new()
|
|
{
|
|
foreach (IConnection connection in connections)
|
|
server.SendToClient(connection, packet, packetDelivery);
|
|
}
|
|
}
|