Esempio n. 1
0
 private static async Task FlushAllConnectionList(string channelSlugUrl)
 {
     #region FlushAllConnectionList
     var allConnectionList = RegisWebSocketProcess.GetConnectionRegisListFromSlug(channelSlugUrl);
     foreach (var connection in allConnectionList)
     {
         var FlushAllConnectionList = new ReceiveSocketDataModel
         {
             ConnectionId     = connection.ConnectionId,
             ConnectionName   = "",
             MessageJson      = new[] { JsonConvert.SerializeObject(allConnectionList.Select(s => s.ConnectionId)) },
             InvokeMethodName = "FlushAllConnectionList"
         };
         await SendToClientWebSocket(connection.WebSocket, FlushAllConnectionList, CancellationToken.None);
     }
     #endregion
 }