public async Task InvokeClientMethodToGroupAsync(string groupID, string methodName, params object[] arguments) { var sockets = WebSocketConnectionManager.GetAllFromGroup(groupID); if (sockets != null) { foreach (var id in sockets) { await InvokeClientMethodAsync(id, methodName, arguments); } } }
public async Task SendMessageToGroupAsync(string groupID, Message message) { var sockets = WebSocketConnectionManager.GetAllFromGroup(groupID); if (sockets != null) { foreach (var socket in sockets) { await SendMessageAsync(socket, message); } } }