aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-17 13:15:34 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-17 13:15:34 -0500
commitea30f766b6348a0d846d9f72191a8c4959bf2483 (patch)
treeb1706bdb6b859103a4d066160f21a0e9831522a3 /MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
parent628c6cbc28f5a744785731dd4e94ec7a1f881dd2 (diff)
parentbb02d68cebb2379623dda5e7803135d80f15b27f (diff)
Merge branch 'dev' of https://github.com/MediaBrowser/MediaBrowser into dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
index c3228db92..0c0922800 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -44,6 +44,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer
private readonly bool _supportsNativeWebSocket;
+ private string _certificatePath;
+
/// <summary>
/// Gets the local end points.
/// </summary>
@@ -217,10 +219,12 @@ namespace MediaBrowser.Server.Implementations.HttpServer
{
if (_supportsNativeWebSocket && NativeWebSocket.IsSupported)
{
+ // Certificate location is ignored here. You need to use netsh
+ // to assign the certificate to the proper port.
return new HttpListenerServer(_logger, OnRequestReceived);
}
- return new WebSocketSharpListener(_logger, OnRequestReceived);
+ return new WebSocketSharpListener(_logger, OnRequestReceived, _certificatePath);
}
private void WebSocketHandler(WebSocketConnectEventArgs args)
@@ -425,8 +429,9 @@ namespace MediaBrowser.Server.Implementations.HttpServer
GC.SuppressFinalize(this);
}
- public void StartServer(IEnumerable<string> urlPrefixes)
+ public void StartServer(IEnumerable<string> urlPrefixes, string certificatePath)
{
+ _certificatePath = certificatePath;
UrlPrefixes = urlPrefixes.ToList();
Start(UrlPrefixes.First());
}