Created
January 13, 2018 18:32
-
-
Save hbulens/5cf52b4a02e42c309dfde7531770498a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNet.SignalR; | |
using Microsoft.AspNet.SignalR.Hubs; | |
public class ChatHub : Hub | |
{ | |
[HubMethodName("sendMessages")] | |
public static void SendMessages() | |
{ | |
IHubContext context = GlobalHost.ConnectionManager.GetHubContext<ChatHub>(); | |
context.Clients.All.updateMessages(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment