using System;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Common.Net
{
///
/// Interface IWebSocket
///
public interface IWebSocket : IDisposable
{
///
/// Gets or sets the state.
///
/// The state.
WebSocketState State { get; }
///
/// Gets or sets the receive action.
///
/// The receive action.
Action OnReceiveDelegate { get; set; }
///
/// Sends the async.
///
/// The bytes.
/// The type.
/// if set to true [end of message].
/// The cancellation token.
/// Task.
Task SendAsync(byte[] bytes, WebSocketMessageType type, bool endOfMessage, CancellationToken cancellationToken);
}
}