Esempio n. 1
0
 public async Task BroadcastMessageAsync(ApiResultNotification message)
 {
     await Clients.All.ReceiveMessage(message);
 }
Esempio n. 2
0
 public async Task SendMessageAsync(string connectionId, ApiResultNotification message)
 {
     var client = Clients.Client(connectionId);
     await client.ReceiveMessage(message);
 }
Esempio n. 3
0
 public Task SendMessageToCaller(ApiResultNotification message)
 {
     return(Clients.Caller.ReceiveMessage(message));
 }
Esempio n. 4
0
 public async Task SendMessageByUserIdAsync(int userId, ApiResultNotification message)
 {
     var client = Clients.User(userId.ToString());
     await client.ReceiveMessage(message);
 }