diff --git a/Huobi.Net.UnitTests/TestImplementations/TestSocket.cs b/Huobi.Net.UnitTests/TestImplementations/TestSocket.cs index 674603a7..af9444db 100644 --- a/Huobi.Net.UnitTests/TestImplementations/TestSocket.cs +++ b/Huobi.Net.UnitTests/TestImplementations/TestSocket.cs @@ -22,7 +22,7 @@ public class TestSocket: IWebsocket public event Func OnRequestRateLimited; #pragma warning restore 0067 public event Func OnRequestSent; - public event Action> OnStreamMessage; + public event Func, Task> OnStreamMessage; public event Func OnError; public event Func OnOpen; @@ -56,12 +56,13 @@ public Task ConnectAsync() return Task.FromResult(CanConnect ? new CallResult(null) : new CallResult(new CantConnectError())); } - public void Send(int requestId, string data, int weight) + public bool Send(int requestId, string data, int weight) { if(!Connected) throw new Exception("Socket not connected"); LastSendMessage = data; OnRequestSent?.Invoke(requestId); + return true; } public void Reset() diff --git a/Huobi.Net/Huobi.Net.csproj b/Huobi.Net/Huobi.Net.csproj index d83b2331..bf35dfe1 100644 --- a/Huobi.Net/Huobi.Net.csproj +++ b/Huobi.Net/Huobi.Net.csproj @@ -1,4 +1,4 @@ - + netstandard2.0;netstandard2.1 enable @@ -52,6 +52,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + \ No newline at end of file