2013-03-06 22:34:00 -07:00
|
|
|
|
using MediaBrowser.Common;
|
2016-10-06 11:55:01 -07:00
|
|
|
|
using MediaBrowser.Common.IO;
|
2015-12-14 07:45:42 -07:00
|
|
|
|
using MediaBrowser.Common.Net;
|
2015-06-12 21:14:48 -07:00
|
|
|
|
using MediaBrowser.Controller.Configuration;
|
2013-12-07 08:52:38 -07:00
|
|
|
|
using MediaBrowser.Controller.Net;
|
2016-10-23 12:14:57 -07:00
|
|
|
|
using MediaBrowser.Model.IO;
|
2013-02-24 14:53:54 -07:00
|
|
|
|
using MediaBrowser.Model.Logging;
|
2013-12-08 19:24:48 -07:00
|
|
|
|
using ServiceStack.Logging;
|
2013-02-24 14:53:54 -07:00
|
|
|
|
|
2013-03-06 22:34:00 -07:00
|
|
|
|
namespace MediaBrowser.Server.Implementations.HttpServer
|
2013-02-24 14:53:54 -07:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class ServerFactory
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static class ServerFactory
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates the server.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>IHttpServer.</returns>
|
2015-06-12 21:14:48 -07:00
|
|
|
|
public static IHttpServer CreateServer(IApplicationHost applicationHost,
|
|
|
|
|
ILogManager logManager,
|
|
|
|
|
IServerConfigurationManager config,
|
2015-12-14 07:45:42 -07:00
|
|
|
|
INetworkManager _networkmanager,
|
2016-10-06 11:55:01 -07:00
|
|
|
|
IMemoryStreamProvider streamProvider,
|
2014-10-06 16:58:46 -07:00
|
|
|
|
string serverName,
|
2015-01-18 12:53:34 -07:00
|
|
|
|
string defaultRedirectpath)
|
2013-02-24 14:53:54 -07:00
|
|
|
|
{
|
2013-12-08 19:24:48 -07:00
|
|
|
|
LogManager.LogFactory = new ServerLogFactory(logManager);
|
2014-10-06 16:58:46 -07:00
|
|
|
|
|
2016-10-06 11:55:01 -07:00
|
|
|
|
return new HttpListenerHost(applicationHost, logManager, config, serverName, defaultRedirectpath, _networkmanager, streamProvider);
|
2013-02-24 14:53:54 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|