1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-19 20:33:03 +00:00

Added websocket base

This commit is contained in:
JKorf
2018-03-08 14:41:14 +01:00
parent 94eb269ade
commit 0f949334f2
5 changed files with 144 additions and 1 deletions
@@ -0,0 +1,24 @@
using System;
using System.Security.Authentication;
using System.Threading.Tasks;
namespace CryptoExchange.Net.Interfaces
{
public interface IWebsocket
{
void SetEnabledSslProtocols(SslProtocols protocols);
event Action OnClose;
event Action<string> OnMessage;
event Action<Exception> OnError;
event Action OnOpen;
bool IsClosed { get; }
bool IsOpen { get; }
Task<bool> Connect();
void Send(string data);
void Close();
void SetProxy(string host, int port);
}
}
@@ -0,0 +1,7 @@
namespace CryptoExchange.Net.Interfaces
{
public interface IWebsocketFactory
{
IWebsocket CreateWebsocket(string url);
}
}