mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-20 12:53:02 +00:00
Added name to message handlers, added socket type to subscription for background sockets
This commit is contained in:
@@ -16,12 +16,14 @@ namespace CryptoExchange.Net.Sockets
|
||||
/// <summary>
|
||||
/// Message handlers for this subscription. Should return true if the message is handled and should not be distributed to the other handlers
|
||||
/// </summary>
|
||||
public List<Func<SocketSubscription, JToken, bool>> MessageHandlers { get; set; }
|
||||
public Dictionary<string, Func<SocketSubscription, JToken, bool>> MessageHandlers { get; set; }
|
||||
public List<SocketEvent> Events { get; set; }
|
||||
|
||||
public IWebsocket Socket { get; set; }
|
||||
public SocketRequest Request { get; set; }
|
||||
|
||||
public SocketType Type { get; set; }
|
||||
|
||||
private bool lostTriggered;
|
||||
private List<SocketEvent> waitingForEvents;
|
||||
|
||||
@@ -32,7 +34,7 @@ namespace CryptoExchange.Net.Sockets
|
||||
Events = new List<SocketEvent>();
|
||||
waitingForEvents = new List<SocketEvent>();
|
||||
|
||||
MessageHandlers = new List<Func<SocketSubscription, JToken, bool>>();
|
||||
MessageHandlers = new Dictionary<string, Func<SocketSubscription, JToken, bool>>();
|
||||
|
||||
Socket.OnClose += () =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user