From 13563b604756152fe2f6630a4cb8fd2994e5bb62 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 25 Feb 2014 23:38:21 -0500 Subject: Add upnp configuration --- .../WebSocket/FleckWebSocket.cs | 47 ---------------------- 1 file changed, 47 deletions(-) delete mode 100644 MediaBrowser.Server.Implementations/WebSocket/FleckWebSocket.cs (limited to 'MediaBrowser.Server.Implementations/WebSocket/FleckWebSocket.cs') diff --git a/MediaBrowser.Server.Implementations/WebSocket/FleckWebSocket.cs b/MediaBrowser.Server.Implementations/WebSocket/FleckWebSocket.cs deleted file mode 100644 index 3667fab07..000000000 --- a/MediaBrowser.Server.Implementations/WebSocket/FleckWebSocket.cs +++ /dev/null @@ -1,47 +0,0 @@ -using MediaBrowser.Common.Net; -using MediaBrowser.Model.Net; -using System; -using System.Threading; -using System.Threading.Tasks; -using IWebSocketConnection = Fleck.IWebSocketConnection; - -namespace MediaBrowser.Server.Implementations.WebSocket -{ - public class FleckWebSocket : IWebSocket - { - private readonly IWebSocketConnection _connection; - - public FleckWebSocket(IWebSocketConnection connection) - { - _connection = connection; - - _connection.OnMessage = OnReceiveData; - } - - public WebSocketState State - { - get { return _connection.IsAvailable ? WebSocketState.Open : WebSocketState.Closed; } - } - - private void OnReceiveData(string data) - { - if (OnReceive != null) - { - OnReceive(data); - } - } - - public Task SendAsync(byte[] bytes, WebSocketMessageType type, bool endOfMessage, CancellationToken cancellationToken) - { - return Task.Run(() => _connection.Send(bytes)); - } - - public void Dispose() - { - _connection.Close(); - } - - public Action OnReceiveBytes { get; set; } - public Action OnReceive { get; set; } - } -} -- cgit v1.2.3