forked from ddrilling/AsbCloudServer
22 lines
643 B
C#
22 lines
643 B
C#
|
using AsbCloudApp.Data;
|
|||
|
using Microsoft.AspNetCore.Authorization;
|
|||
|
using Microsoft.AspNetCore.SignalR;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace AsbCloudWebApi.WebSocket
|
|||
|
{
|
|||
|
|
|||
|
[Authorize]
|
|||
|
public class TelemetryHub : Hub<ITelemetryHubClient>
|
|||
|
{
|
|||
|
public Task AddToGroup(string groupName)
|
|||
|
=> Groups.AddToGroupAsync(Context.ConnectionId, groupName.ToString());
|
|||
|
|
|||
|
public Task RemoveFromGroup(string groupName)
|
|||
|
=> Groups.RemoveFromGroupAsync(Context.ConnectionId, groupName);
|
|||
|
|
|||
|
public Task SendDataSaub(int wellId, DataSaubBaseDto data)
|
|||
|
=> Clients.All.ReceiveDataSaub(data);
|
|||
|
|
|||
|
}
|
|||
|
}
|