Ssl in mediabrowser against new listener.

This commit is contained in:
Mike
2015-01-06 22:36:42 -05:00
parent 7a136349ee
commit 2300d56f68
10 changed files with 109 additions and 12 deletions

View File

@@ -18,11 +18,14 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp
private readonly ILogger _logger;
private readonly Action<string> _endpointListener;
private readonly string _certificatePath ;
public WebSocketSharpListener(ILogger logger, Action<string> endpointListener)
public WebSocketSharpListener(ILogger logger, Action<string> endpointListener,
string certificatePath)
{
_logger = logger;
_endpointListener = endpointListener;
_certificatePath = certificatePath;
}
public Action<Exception, IRequest> ErrorHandler { get; set; }
@@ -34,7 +37,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp
public void Start(IEnumerable<string> urlPrefixes)
{
if (_listener == null)
_listener = new HttpListener(new PatternsLogger(_logger), null);
_listener = new HttpListener(new PatternsLogger(_logger), _certificatePath);
foreach (var prefix in urlPrefixes)
{