update to service stack v4

This commit is contained in:
Luke Pulverenti
2013-12-07 10:52:38 -05:00
parent 1b1bcabbb1
commit f32212d160
110 changed files with 1047 additions and 7749 deletions

View File

@@ -184,5 +184,41 @@ namespace MediaBrowser.Server.Implementations.HttpServer
/// </summary>
/// <value>The on receive.</value>
public Action<string> OnReceive { get; set; }
/// <summary>
/// The _supports native web socket
/// </summary>
private static bool? _supportsNativeWebSocket;
/// <summary>
/// Gets a value indicating whether [supports web sockets].
/// </summary>
/// <value><c>true</c> if [supports web sockets]; otherwise, <c>false</c>.</value>
public static bool IsSupported
{
get
{
#if __MonoCS__
return false;
#else
#endif
if (!_supportsNativeWebSocket.HasValue)
{
try
{
new ClientWebSocket();
_supportsNativeWebSocket = true;
}
catch (PlatformNotSupportedException)
{
_supportsNativeWebSocket = false;
}
}
return _supportsNativeWebSocket.Value;
}
}
}
}