2013-09-11 08:33:47 +02:00
|
|
|
using Microsoft.AspNet.SignalR;
|
|
|
|
using Microsoft.AspNet.SignalR.Infrastructure;
|
2013-09-14 08:36:07 +02:00
|
|
|
using NzbDrone.Core.Messaging.Commands;
|
2013-09-11 08:33:47 +02:00
|
|
|
|
|
|
|
namespace NzbDrone.SignalR
|
|
|
|
{
|
|
|
|
public sealed class NzbDronePersistentConnection : PersistentConnection, IExecute<BroadcastSignalRMessage>
|
|
|
|
{
|
|
|
|
private IPersistentConnectionContext Context
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return ((ConnectionManager)GlobalHost.ConnectionManager).GetConnection(GetType());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Execute(BroadcastSignalRMessage message)
|
|
|
|
{
|
|
|
|
Context.Connection.Broadcast(message.Body);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|