using MediaBrowser.Common;
using MediaBrowser.Controller.Net;
using MediaBrowser.Model.Logging;
using ServiceStack.Logging;
namespace MediaBrowser.Server.Implementations.HttpServer
{
///
/// Class ServerFactory
///
public static class ServerFactory
{
///
/// Creates the server.
///
/// The application host.
/// The log manager.
/// Name of the server.
/// The handler path.
/// The default redirectpath.
/// if set to true [supports native web socket].
/// IHttpServer.
public static IHttpServer CreateServer(IApplicationHost applicationHost,
ILogManager logManager,
string serverName,
string handlerPath,
string defaultRedirectpath,
bool supportsNativeWebSocket)
{
LogManager.LogFactory = new ServerLogFactory(logManager);
return new HttpListenerHost(applicationHost, logManager, serverName, handlerPath, defaultRedirectpath, supportsNativeWebSocket);
}
}
}