Created
October 10, 2017 13:19
-
-
Save DanielSSilva/f99fdbaf4199c84379c24667382ab8ba to your computer and use it in GitHub Desktop.
SignalR sample
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
namespace Employee_SignalR | |
{ | |
public class EntryPoint : Hub | |
{ | |
public void BroadcastToGroupName(string groupName, string information) | |
{ | |
Clients.Group(groupName).InvokeAsync("ClientMethod", $"{information} - {groupName}"); | |
} | |
public void RegisterConnectionOnGroup(string groupName) | |
{ | |
Groups.AddAsync(Context.ConnectionId, groupName); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment