using System; using System.Threading.Tasks; namespace Fleck { public interface IWebSocketConnection { Action OnOpen { get; set; } Action OnClose { get; set; } Action OnMessage { get; set; } Action OnBinary { get; set; } Action OnPing { get; set; } Action OnPong { get; set; } Action OnError { get; set; } Task Send(string message); Task Send(byte[] message); Task SendPing(byte[] message); Task SendPong(byte[] message); void Close(); void Close(int code); IWebSocketConnectionInfo ConnectionInfo { get; } bool IsAvailable { get; } } }