diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /MediaBrowser.Model/Net | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'MediaBrowser.Model/Net')
| -rw-r--r-- | MediaBrowser.Model/Net/EndPointInfo.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/HttpException.cs | 43 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/HttpResponse.cs | 65 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/IAcceptSocket.cs | 27 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/ISocket.cs | 28 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/ISocketFactory.cs | 51 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/IpAddressInfo.cs | 42 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/IpEndPointInfo.cs | 30 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/MimeTypes.cs | 359 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/NetworkShare.cs | 31 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/NetworkShareType.cs | 30 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/SocketReceiveResult.cs | 25 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/WebSocketMessage.cs | 22 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/WebSocketMessageType.cs | 22 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/WebSocketState.cs | 38 |
15 files changed, 0 insertions, 821 deletions
diff --git a/MediaBrowser.Model/Net/EndPointInfo.cs b/MediaBrowser.Model/Net/EndPointInfo.cs deleted file mode 100644 index 5a158e785..000000000 --- a/MediaBrowser.Model/Net/EndPointInfo.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace MediaBrowser.Model.Net -{ - public class EndPointInfo - { - public bool IsLocal { get; set; } - public bool IsInNetwork { get; set; } - } -} diff --git a/MediaBrowser.Model/Net/HttpException.cs b/MediaBrowser.Model/Net/HttpException.cs deleted file mode 100644 index 698b1bc7e..000000000 --- a/MediaBrowser.Model/Net/HttpException.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Net; - -namespace MediaBrowser.Model.Net -{ - /// <summary> - /// Class HttpException - /// </summary> - public class HttpException : Exception - { - /// <summary> - /// Gets or sets the status code. - /// </summary> - /// <value>The status code.</value> - public HttpStatusCode? StatusCode { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether this instance is timed out. - /// </summary> - /// <value><c>true</c> if this instance is timed out; otherwise, <c>false</c>.</value> - public bool IsTimedOut { get; set; } - - /// <summary> - /// Initializes a new instance of the <see cref="HttpException" /> class. - /// </summary> - /// <param name="message">The message.</param> - /// <param name="innerException">The inner exception.</param> - public HttpException(string message, Exception innerException) - : base(message, innerException) - { - - } - - /// <summary> - /// Initializes a new instance of the <see cref="HttpException" /> class. - /// </summary> - /// <param name="message">The message.</param> - public HttpException(string message) - : base(message) - { - } - } -} diff --git a/MediaBrowser.Model/Net/HttpResponse.cs b/MediaBrowser.Model/Net/HttpResponse.cs deleted file mode 100644 index 7c3d1d73d..000000000 --- a/MediaBrowser.Model/Net/HttpResponse.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; - -namespace MediaBrowser.Model.Net -{ - public class HttpResponse : IDisposable - { - /// <summary> - /// Gets or sets the type of the content. - /// </summary> - /// <value>The type of the content.</value> - public string ContentType { get; set; } - - /// <summary> - /// Gets or sets the response URL. - /// </summary> - /// <value>The response URL.</value> - public string ResponseUrl { get; set; } - - /// <summary> - /// Gets or sets the content. - /// </summary> - /// <value>The content.</value> - public Stream Content { get; set; } - - /// <summary> - /// Gets or sets the status code. - /// </summary> - /// <value>The status code.</value> - public HttpStatusCode StatusCode { get; set; } - - /// <summary> - /// Gets or sets the length of the content. - /// </summary> - /// <value>The length of the content.</value> - public long? ContentLength { get; set; } - - /// <summary> - /// Gets or sets the headers. - /// </summary> - /// <value>The headers.</value> - public Dictionary<string, string> Headers { get; set; } - - private readonly IDisposable _disposable; - - public HttpResponse(IDisposable disposable) - { - _disposable = disposable; - } - public HttpResponse() - { - } - - public void Dispose() - { - if (_disposable != null) - { - _disposable.Dispose(); - } - GC.SuppressFinalize(this); - } - } -} diff --git a/MediaBrowser.Model/Net/IAcceptSocket.cs b/MediaBrowser.Model/Net/IAcceptSocket.cs deleted file mode 100644 index 343e12ab6..000000000 --- a/MediaBrowser.Model/Net/IAcceptSocket.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; - -namespace MediaBrowser.Model.Net -{ - public interface IAcceptSocket : IDisposable - { - bool DualMode { get; } - IpEndPointInfo LocalEndPoint { get; } - IpEndPointInfo RemoteEndPoint { get; } - void Close(); - void Shutdown(bool both); - void Listen(int backlog); - void Bind(IpEndPointInfo endpoint); - void Connect(IpEndPointInfo endPoint); - } - - public class SocketCreateException : Exception - { - public SocketCreateException(string errorCode, Exception originalException) - : base(errorCode, originalException) - { - ErrorCode = errorCode; - } - - public string ErrorCode { get; private set; } - } -} diff --git a/MediaBrowser.Model/Net/ISocket.cs b/MediaBrowser.Model/Net/ISocket.cs deleted file mode 100644 index 6a6781026..000000000 --- a/MediaBrowser.Model/Net/ISocket.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace MediaBrowser.Model.Net -{ - /// <summary> - /// Provides a common interface across platforms for UDP sockets used by this SSDP implementation. - /// </summary> - public interface ISocket : IDisposable - { - IpAddressInfo LocalIPAddress { get; } - - Task<SocketReceiveResult> ReceiveAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken); - - int Receive(byte[] buffer, int offset, int count); - - IAsyncResult BeginReceive(byte[] buffer, int offset, int count, AsyncCallback callback); - SocketReceiveResult EndReceive(IAsyncResult result); - - /// <summary> - /// Sends a UDP message to a particular end point (uni or multicast). - /// </summary> - Task SendToAsync(byte[] buffer, int offset, int bytes, IpEndPointInfo endPoint, CancellationToken cancellationToken); - } -}
\ No newline at end of file diff --git a/MediaBrowser.Model/Net/ISocketFactory.cs b/MediaBrowser.Model/Net/ISocketFactory.cs deleted file mode 100644 index bf2424660..000000000 --- a/MediaBrowser.Model/Net/ISocketFactory.cs +++ /dev/null @@ -1,51 +0,0 @@ - -using System.IO; - -namespace MediaBrowser.Model.Net -{ - /// <summary> - /// Implemented by components that can create a platform specific UDP socket implementation, and wrap it in the cross platform <see cref="ISocket"/> interface. - /// </summary> - public interface ISocketFactory - { - - /// <summary> - /// Createa a new unicast socket using the specified local port number. - /// </summary> - /// <param name="localPort">The local port to bind to.</param> - /// <returns>A <see cref="ISocket"/> implementation.</returns> - ISocket CreateUdpSocket(int localPort); - - ISocket CreateUdpBroadcastSocket(int localPort); - - ISocket CreateTcpSocket(IpAddressInfo remoteAddress, int remotePort); - - /// <summary> - /// Createa a new unicast socket using the specified local port number. - /// </summary> - ISocket CreateSsdpUdpSocket(IpAddressInfo localIp, int localPort); - - /// <summary> - /// Createa a new multicast socket using the specified multicast IP address, multicast time to live and local port. - /// </summary> - /// <param name="ipAddress">The multicast IP address to bind to.</param> - /// <param name="multicastTimeToLive">The multicast time to live value. Actually a maximum number of network hops for UDP packets.</param> - /// <param name="localPort">The local port to bind to.</param> - /// <returns>A <see cref="ISocket"/> implementation.</returns> - ISocket CreateUdpMulticastSocket(string ipAddress, int multicastTimeToLive, int localPort); - - IAcceptSocket CreateSocket(IpAddressFamily family, SocketType socketType, ProtocolType protocolType, bool dualMode); - - Stream CreateNetworkStream(ISocket socket, bool ownsSocket); - } - - public enum SocketType - { - Stream - } - - public enum ProtocolType - { - Tcp - } -} diff --git a/MediaBrowser.Model/Net/IpAddressInfo.cs b/MediaBrowser.Model/Net/IpAddressInfo.cs deleted file mode 100644 index 57a0039c4..000000000 --- a/MediaBrowser.Model/Net/IpAddressInfo.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; - -namespace MediaBrowser.Model.Net -{ - public class IpAddressInfo - { - public static IpAddressInfo Any = new IpAddressInfo("0.0.0.0", IpAddressFamily.InterNetwork); - public static IpAddressInfo IPv6Any = new IpAddressInfo("00000000000000000000", IpAddressFamily.InterNetworkV6); - public static IpAddressInfo Loopback = new IpAddressInfo("127.0.0.1", IpAddressFamily.InterNetwork); - public static IpAddressInfo IPv6Loopback = new IpAddressInfo("::1", IpAddressFamily.InterNetworkV6); - - public string Address { get; set; } - public IpAddressFamily AddressFamily { get; set; } - - public IpAddressInfo(string address, IpAddressFamily addressFamily) - { - if (string.IsNullOrWhiteSpace(address)) - { - throw new ArgumentNullException("address"); - } - - Address = address; - AddressFamily = addressFamily; - } - - public bool Equals(IpAddressInfo address) - { - return string.Equals(address.Address, Address, StringComparison.OrdinalIgnoreCase); - } - - public override String ToString() - { - return Address; - } - } - - public enum IpAddressFamily - { - InterNetwork, - InterNetworkV6 - } -} diff --git a/MediaBrowser.Model/Net/IpEndPointInfo.cs b/MediaBrowser.Model/Net/IpEndPointInfo.cs deleted file mode 100644 index b5cadc429..000000000 --- a/MediaBrowser.Model/Net/IpEndPointInfo.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Globalization; - -namespace MediaBrowser.Model.Net -{ - public class IpEndPointInfo - { - public IpAddressInfo IpAddress { get; set; } - - public int Port { get; set; } - - public IpEndPointInfo() - { - - } - - public IpEndPointInfo(IpAddressInfo address, int port) - { - IpAddress = address; - Port = port; - } - - public override string ToString() - { - var ipAddresString = IpAddress == null ? string.Empty : IpAddress.ToString(); - - return ipAddresString + ":" + Port.ToString(CultureInfo.InvariantCulture); - } - } -} diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs deleted file mode 100644 index c4dfd25ca..000000000 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ /dev/null @@ -1,359 +0,0 @@ -using MediaBrowser.Model.Extensions; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; - -namespace MediaBrowser.Model.Net -{ - /// <summary> - /// Class MimeTypes - /// </summary> - public static class MimeTypes - { - /// <summary> - /// Any extension in this list is considered a video file - can be added to at runtime for extensibility - /// </summary> - private static readonly string[] VideoFileExtensions = new string[] - { - ".mkv", - ".m2t", - ".m2ts", - ".img", - ".iso", - ".mk3d", - ".ts", - ".rmvb", - ".mov", - ".avi", - ".mpg", - ".mpeg", - ".wmv", - ".mp4", - ".divx", - ".dvr-ms", - ".wtv", - ".ogm", - ".ogv", - ".asf", - ".m4v", - ".flv", - ".f4v", - ".3gp", - ".webm", - ".mts", - ".m2v", - ".rec" - }; - - private static Dictionary<string, string> GetVideoFileExtensionsDictionary() - { - Dictionary<string, string> dict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); - - foreach (string ext in VideoFileExtensions) - { - dict[ext] = ext; - } - - return dict; - } - - private static readonly Dictionary<string, string> VideoFileExtensionsDictionary = GetVideoFileExtensionsDictionary(); - - // http://en.wikipedia.org/wiki/Internet_media_type - // Add more as needed - - private static Dictionary<string, string> GetMimeTypeLookup() - { - Dictionary<string, string> dict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); - - dict.Add(".jpg", "image/jpeg"); - dict.Add(".jpeg", "image/jpeg"); - dict.Add(".tbn", "image/jpeg"); - dict.Add(".png", "image/png"); - dict.Add(".gif", "image/gif"); - dict.Add(".tiff", "image/tiff"); - dict.Add(".webp", "image/webp"); - dict.Add(".ico", "image/vnd.microsoft.icon"); - dict.Add(".mpg", "video/mpeg"); - dict.Add(".mpeg", "video/mpeg"); - dict.Add(".ogv", "video/ogg"); - dict.Add(".mov", "video/quicktime"); - dict.Add(".webm", "video/webm"); - dict.Add(".mkv", "video/x-matroska"); - dict.Add(".wmv", "video/x-ms-wmv"); - dict.Add(".flv", "video/x-flv"); - dict.Add(".avi", "video/x-msvideo"); - dict.Add(".asf", "video/x-ms-asf"); - dict.Add(".m4v", "video/x-m4v"); - - return dict; - } - - private static readonly Dictionary<string, string> MimeTypeLookup = GetMimeTypeLookup(); - - private static readonly Dictionary<string, string> ExtensionLookup = CreateExtensionLookup(); - - private static Dictionary<string, string> CreateExtensionLookup() - { - var dict = MimeTypeLookup - .GroupBy(i => i.Value) - .ToDictionary(x => x.Key, x => x.First().Key, StringComparer.OrdinalIgnoreCase); - - dict["image/jpg"] = ".jpg"; - dict["image/x-png"] = ".png"; - - return dict; - } - - public static string GetMimeType(string path) - { - return GetMimeType(path, true); - } - - /// <summary> - /// Gets the type of the MIME. - /// </summary> - public static string GetMimeType(string path, bool enableStreamDefault) - { - if (string.IsNullOrEmpty(path)) - { - throw new ArgumentNullException("path"); - } - - var ext = Path.GetExtension(path) ?? string.Empty; - - string result; - if (MimeTypeLookup.TryGetValue(ext, out result)) - { - return result; - } - - // Type video - if (StringHelper.EqualsIgnoreCase(ext, ".3gp")) - { - return "video/3gpp"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".3g2")) - { - return "video/3gpp2"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".ts")) - { - return "video/mp2t"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".mpd")) - { - return "video/vnd.mpeg.dash.mpd"; - } - - // Catch-all for all video types that don't require specific mime types - if (VideoFileExtensionsDictionary.ContainsKey(ext)) - { - return "video/" + ext.TrimStart('.').ToLower(); - } - - // Type text - if (StringHelper.EqualsIgnoreCase(ext, ".css")) - { - return "text/css"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".csv")) - { - return "text/csv"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".html")) - { - return "text/html; charset=UTF-8"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".htm")) - { - return "text/html; charset=UTF-8"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".txt")) - { - return "text/plain"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".xml")) - { - return "application/xml"; - } - - // Type document - if (StringHelper.EqualsIgnoreCase(ext, ".pdf")) - { - return "application/pdf"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".mobi")) - { - return "application/x-mobipocket-ebook"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".epub")) - { - return "application/epub+zip"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".cbz")) - { - return "application/epub+zip"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".cbr")) - { - return "application/epub+zip"; - } - - // Type audio - if (StringHelper.EqualsIgnoreCase(ext, ".mp3")) - { - return "audio/mpeg"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".m4a")) - { - return "audio/mp4"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".aac")) - { - return "audio/mp4"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".webma")) - { - return "audio/webm"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".wav")) - { - return "audio/wav"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".wma")) - { - return "audio/x-ms-wma"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".flac")) - { - return "audio/flac"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".aac")) - { - return "audio/x-aac"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".ogg")) - { - return "audio/ogg"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".oga")) - { - return "audio/ogg"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".opus")) - { - return "audio/ogg"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".ac3")) - { - return "audio/ac3"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".dsf")) - { - return "audio/dsf"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".m4b")) - { - return "audio/m4b"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".xsp")) - { - return "audio/xsp"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".dsp")) - { - return "audio/dsp"; - } - - // Playlists - if (StringHelper.EqualsIgnoreCase(ext, ".m3u8")) - { - return "application/x-mpegURL"; - } - - // Misc - if (StringHelper.EqualsIgnoreCase(ext, ".dll")) - { - return "application/octet-stream"; - } - - // Web - if (StringHelper.EqualsIgnoreCase(ext, ".js")) - { - return "application/x-javascript"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".json")) - { - return "application/json"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".map")) - { - return "application/x-javascript"; - } - - if (StringHelper.EqualsIgnoreCase(ext, ".woff")) - { - return "font/woff"; - } - - if (StringHelper.EqualsIgnoreCase(ext, ".ttf")) - { - return "font/ttf"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".eot")) - { - return "application/vnd.ms-fontobject"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".svg")) - { - return "image/svg+xml"; - } - if (StringHelper.EqualsIgnoreCase(ext, ".svgz")) - { - return "image/svg+xml"; - } - - if (StringHelper.EqualsIgnoreCase(ext, ".srt")) - { - return "text/plain"; - } - - if (StringHelper.EqualsIgnoreCase(ext, ".vtt")) - { - return "text/vtt"; - } - - if (StringHelper.EqualsIgnoreCase(ext, ".ttml")) - { - return "application/ttml+xml"; - } - - if (enableStreamDefault) - { - return "application/octet-stream"; - } - - return null; - } - - public static string ToExtension(string mimeType) - { - if (string.IsNullOrEmpty(mimeType)) - { - throw new ArgumentNullException("mimeType"); - } - - // handle text/html; charset=UTF-8 - mimeType = mimeType.Split(';')[0]; - - string result; - if (ExtensionLookup.TryGetValue(mimeType, out result)) - { - return result; - } - return null; - } - } -} diff --git a/MediaBrowser.Model/Net/NetworkShare.cs b/MediaBrowser.Model/Net/NetworkShare.cs deleted file mode 100644 index 5ce84eeed..000000000 --- a/MediaBrowser.Model/Net/NetworkShare.cs +++ /dev/null @@ -1,31 +0,0 @@ - -namespace MediaBrowser.Model.Net -{ - public class NetworkShare - { - /// <summary> - /// The name of the computer that this share belongs to - /// </summary> - public string Server { get; set; } - - /// <summary> - /// Share name - /// </summary> - public string Name { get; set; } - - /// <summary> - /// Local path - /// </summary> - public string Path { get; set; } - - /// <summary> - /// Share type - /// </summary> - public NetworkShareType ShareType { get; set; } - - /// <summary> - /// Comment - /// </summary> - public string Remark { get; set; } - } -} diff --git a/MediaBrowser.Model/Net/NetworkShareType.cs b/MediaBrowser.Model/Net/NetworkShareType.cs deleted file mode 100644 index 41dc9003e..000000000 --- a/MediaBrowser.Model/Net/NetworkShareType.cs +++ /dev/null @@ -1,30 +0,0 @@ - -namespace MediaBrowser.Model.Net -{ - /// <summary> - /// Enum NetworkShareType - /// </summary> - public enum NetworkShareType - { - /// <summary> - /// Disk share - /// </summary> - Disk, - /// <summary> - /// Printer share - /// </summary> - Printer, - /// <summary> - /// Device share - /// </summary> - Device, - /// <summary> - /// IPC share - /// </summary> - Ipc, - /// <summary> - /// Special share - /// </summary> - Special - } -} diff --git a/MediaBrowser.Model/Net/SocketReceiveResult.cs b/MediaBrowser.Model/Net/SocketReceiveResult.cs deleted file mode 100644 index 483e2297b..000000000 --- a/MediaBrowser.Model/Net/SocketReceiveResult.cs +++ /dev/null @@ -1,25 +0,0 @@ - -namespace MediaBrowser.Model.Net -{ - /// <summary> - /// Used by the sockets wrapper to hold raw data received from a UDP socket. - /// </summary> - public sealed class SocketReceiveResult - { - /// <summary> - /// The buffer to place received data into. - /// </summary> - public byte[] Buffer { get; set; } - - /// <summary> - /// The number of bytes received. - /// </summary> - public int ReceivedBytes { get; set; } - - /// <summary> - /// The <see cref="IpEndPointInfo"/> the data was received from. - /// </summary> - public IpEndPointInfo RemoteEndPoint { get; set; } - public IpAddressInfo LocalIPAddress { get; set; } - } -} diff --git a/MediaBrowser.Model/Net/WebSocketMessage.cs b/MediaBrowser.Model/Net/WebSocketMessage.cs deleted file mode 100644 index 2cd6828b3..000000000 --- a/MediaBrowser.Model/Net/WebSocketMessage.cs +++ /dev/null @@ -1,22 +0,0 @@ - -namespace MediaBrowser.Model.Net -{ - /// <summary> - /// Class WebSocketMessage - /// </summary> - /// <typeparam name="T"></typeparam> - public class WebSocketMessage<T> - { - /// <summary> - /// Gets or sets the type of the message. - /// </summary> - /// <value>The type of the message.</value> - public string MessageType { get; set; } - /// <summary> - /// Gets or sets the data. - /// </summary> - /// <value>The data.</value> - public T Data { get; set; } - } - -} diff --git a/MediaBrowser.Model/Net/WebSocketMessageType.cs b/MediaBrowser.Model/Net/WebSocketMessageType.cs deleted file mode 100644 index 37ae7fc55..000000000 --- a/MediaBrowser.Model/Net/WebSocketMessageType.cs +++ /dev/null @@ -1,22 +0,0 @@ - -namespace MediaBrowser.Model.Net -{ - /// <summary> - /// Enum WebSocketMessageType - /// </summary> - public enum WebSocketMessageType - { - /// <summary> - /// The text - /// </summary> - Text, - /// <summary> - /// The binary - /// </summary> - Binary, - /// <summary> - /// The close - /// </summary> - Close - } -} diff --git a/MediaBrowser.Model/Net/WebSocketState.cs b/MediaBrowser.Model/Net/WebSocketState.cs deleted file mode 100644 index 41a2e9741..000000000 --- a/MediaBrowser.Model/Net/WebSocketState.cs +++ /dev/null @@ -1,38 +0,0 @@ - -namespace MediaBrowser.Model.Net -{ - /// <summary> - /// Enum WebSocketState - /// </summary> - public enum WebSocketState - { - /// <summary> - /// The none - /// </summary> - None, - /// <summary> - /// The connecting - /// </summary> - Connecting, - /// <summary> - /// The open - /// </summary> - Open, - /// <summary> - /// The close sent - /// </summary> - CloseSent, - /// <summary> - /// The close received - /// </summary> - CloseReceived, - /// <summary> - /// The closed - /// </summary> - Closed, - /// <summary> - /// The aborted - /// </summary> - Aborted - } -} |
