public SendMessageToSessions ( List |
||
sessIds | List |
|
messageName | string | |
message | string | |
return | void |
public void SendMessageToSessions(List<string> sessIds, string messageName, string message)
{
if (sessIds == null) return;
try
{
lock (_Clients)
{
sessIds = sessIds.ToList();
List<string> clientIds = new List<string>();
foreach (var sessId in sessIds)
{
if (_SessIdClientId.ContainsKey(sessId))
{
clientIds.AddRange(_SessIdClientId[sessId]);
}
}
SendMessage(clientIds, messageName, message);
}
}
catch (Exception ex)
{
_Logger.LogException(ex, "Exception in SendMessageToSessions");
}
}
#endregion