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:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user