Guest User

Untitled

a guest
Jan 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. using Microsoft.AspNet.SignalR;
  2. using Microsoft.AspNet.SignalR.Hubs;
  3.  
  4. public class ChatHub : Hub
  5. {
  6. [HubMethodName("sendMessages")]
  7. public static void SendMessages()
  8. {
  9. IHubContext context = GlobalHost.ConnectionManager.GetHubContext<ChatHub>();
  10. context.Clients.All.updateMessages();
  11. }
  12. }
Add Comment
Please, Sign In to add comment