Skip to content

Instantly share code, notes, and snippets.

@DanielSSilva
Created October 10, 2017 13:19
Show Gist options
  • Save DanielSSilva/f99fdbaf4199c84379c24667382ab8ba to your computer and use it in GitHub Desktop.
Save DanielSSilva/f99fdbaf4199c84379c24667382ab8ba to your computer and use it in GitHub Desktop.
SignalR sample
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