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

Updated IExchangeClient interface, added HandleUnhandledMessage virtual method in SocketClient

This commit is contained in:
Jkorf
2020-12-21 14:11:36 +01:00
parent 7a54625bb5
commit 31842b415d
5 changed files with 253 additions and 6 deletions
@@ -36,6 +36,10 @@ namespace CryptoExchange.Net.Sockets
/// Connecting closed event
/// </summary>
public event Action? Closed;
/// <summary>
/// Unhandled message event
/// </summary>
public event Action<JToken>? UnhandledMessage;
/// <summary>
/// The amount of handlers
@@ -162,7 +166,8 @@ namespace CryptoExchange.Net.Sockets
if (!HandleData(tokenData) && !handledResponse)
{
log.Write(LogVerbosity.Debug, "Message not handled: " + tokenData);
log.Write(LogVerbosity.Warning, "Message not handled: " + tokenData);
UnhandledMessage?.Invoke(tokenData);
}
}