Selector/Selector.Web/Hubs/NowPlayingHub.cs

21 lines
461 B
C#
Raw Normal View History

2021-10-31 19:55:00 +00:00
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.SignalR;
using Selector.Cache;
namespace Selector.Web.Hubs
{
public interface INowPlayingHubClient
{
public Task OnNewPlaying(CurrentlyPlayingDTO context);
}
public class NowPlayingHub: Hub<INowPlayingHubClient>
{
public Task SendNewPlaying(CurrentlyPlayingDTO context)
{
return Clients.All.OnNewPlaying(context);
}
}
}