jellyfin/MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs

36 lines
1.3 KiB
C#
Raw Normal View History

2013-03-07 06:34:00 +01:00
using MediaBrowser.Common;
2013-12-07 16:52:38 +01:00
using MediaBrowser.Controller.Net;
2013-02-24 22:53:54 +01:00
using MediaBrowser.Model.Logging;
2013-12-09 03:24:48 +01:00
using ServiceStack.Logging;
2013-02-24 22:53:54 +01:00
2013-03-07 06:34:00 +01:00
namespace MediaBrowser.Server.Implementations.HttpServer
2013-02-24 22:53:54 +01:00
{
/// <summary>
/// Class ServerFactory
/// </summary>
public static class ServerFactory
{
/// <summary>
/// Creates the server.
/// </summary>
/// <param name="applicationHost">The application host.</param>
2013-04-17 21:16:36 +02:00
/// <param name="logManager">The log manager.</param>
2013-02-24 22:53:54 +01:00
/// <param name="serverName">Name of the server.</param>
2013-12-07 16:52:38 +01:00
/// <param name="handlerPath">The handler path.</param>
2013-02-24 22:53:54 +01:00
/// <param name="defaultRedirectpath">The default redirectpath.</param>
2014-10-07 01:58:46 +02:00
/// <param name="supportsNativeWebSocket">if set to <c>true</c> [supports native web socket].</param>
2013-02-24 22:53:54 +01:00
/// <returns>IHttpServer.</returns>
2014-10-07 01:58:46 +02:00
public static IHttpServer CreateServer(IApplicationHost applicationHost,
ILogManager logManager,
string serverName,
string handlerPath,
string defaultRedirectpath,
bool supportsNativeWebSocket)
2013-02-24 22:53:54 +01:00
{
2013-12-09 03:24:48 +01:00
LogManager.LogFactory = new ServerLogFactory(logManager);
2014-10-07 01:58:46 +02:00
return new HttpListenerHost(applicationHost, logManager, serverName, handlerPath, defaultRedirectpath, supportsNativeWebSocket);
2013-02-24 22:53:54 +01:00
}
}
}