sonarr-repo-only/NzbDrone.Host/Owin/MiddleWare/SignalRMiddleWare.cs

25 lines
713 B
C#
Raw Normal View History

using System;
2013-05-05 21:24:33 +00:00
using Microsoft.AspNet.SignalR;
2013-05-10 23:53:50 +00:00
using NzbDrone.Common.Composition;
2013-09-11 06:33:47 +00:00
using NzbDrone.SignalR;
using Owin;
namespace NzbDrone.Host.Owin.MiddleWare
{
public class SignalRMiddleWare : IOwinMiddleWare
{
2013-05-05 21:24:33 +00:00
public int Order { get { return 0; } }
2013-09-11 06:33:47 +00:00
public SignalRMiddleWare(IContainer container)
{
2013-05-05 21:24:33 +00:00
SignalrDependencyResolver.Register(container);
GlobalHost.Configuration.DisconnectTimeout = TimeSpan.FromSeconds(300000);
}
public void Attach(IAppBuilder appBuilder)
{
2013-09-11 06:33:47 +00:00
appBuilder.MapConnection("signalr", typeof(NzbDronePersistentConnection), new ConnectionConfiguration { EnableCrossDomain = true });
}
}
}