You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
483 B
18 lines
483 B
using Microsoft.AspNetCore.SignalR;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace IoTDameon
|
|
{
|
|
public class DefaultHub : Hub
|
|
{
|
|
public override Task OnConnectedAsync()
|
|
{
|
|
var group = Context.GetHttpContext().Request.Query["group"].ToString();
|
|
if (!string.IsNullOrEmpty(group))
|
|
{
|
|
this.Groups.AddToGroupAsync(Context.ConnectionId, group);
|
|
}
|
|
return base.OnConnectedAsync();
|
|
}
|
|
}
|
|
} |