Exemple #1
0
 public static async Task SendUsersAsync(this IConnectionContext context, IReadOnlyList <string> userIds, Message message)
 {
     var pushMessage = context.CreatePushMessage(message);
     await context.GetConnectionLifetimeManager().SendUsersAsync(userIds, pushMessage);
 }
Exemple #2
0
 public static async Task SendAllExceptAsync(this IConnectionContext context, Message message, IReadOnlyList <string> excludedConnectionIds)
 {
     var pushMessage = context.CreatePushMessage(message);
     await context.GetConnectionLifetimeManager().SendAllExceptAsync(pushMessage, excludedConnectionIds);
 }
Exemple #3
0
 public static async Task SendGroupAsync(this IConnectionContext context, string groupName, Message message)
 {
     var pushMessage = context.CreatePushMessage(message);
     await context.GetConnectionLifetimeManager().SendGroupAsync(groupName, pushMessage);
 }
Exemple #4
0
 public static async Task SendAllAsync(this IConnectionContext context, Message message)
 {
     var pushMessage = context.CreatePushMessage(message);
     await context.GetConnectionLifetimeManager().SendAllAsync(pushMessage);
 }
Exemple #5
0
 public static async Task SendToCaller(this IConnectionContext context, Message message)
 {
     var pushMessage = context.CreatePushMessage(message);
     await context.WriteAsync(pushMessage, CancellationToken.None);
 }