mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-08 00:16:27 +00:00
Fixed copy/paste error in socket eventhandler, update testwebsocket
This commit is contained in:
parent
28c42e3e5e
commit
525ae41245
@ -7,7 +7,7 @@
|
||||
<PropertyGroup>
|
||||
<PackageId>CryptoExchange.Net</PackageId>
|
||||
<Authors>JKorf</Authors>
|
||||
<PackageVersion>0.0.30</PackageVersion>
|
||||
<PackageVersion>0.0.31</PackageVersion>
|
||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||
<PackageProjectUrl>https://github.com/JKorf/CryptoExchange.Net</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://github.com/JKorf/CryptoExchange.Net/blob/master/LICENSE</PackageLicenseUrl>
|
||||
|
@ -75,7 +75,7 @@ namespace CryptoExchange.Net.Implementation
|
||||
public event Action OnOpen
|
||||
{
|
||||
add => openhandlers.Add(value);
|
||||
remove => closehandlers.Remove(value);
|
||||
remove => openhandlers.Remove(value);
|
||||
}
|
||||
|
||||
protected static void Handle(List<Action> handlers)
|
||||
|
@ -28,7 +28,7 @@ namespace CryptoExchange.Net.Implementation
|
||||
public event Action<Exception> OnError;
|
||||
public event Action OnOpen;
|
||||
|
||||
public bool IsClosed { get; private set; }
|
||||
public bool IsClosed { get; private set; } = true;
|
||||
public bool IsOpen { get; private set; }
|
||||
public bool PingConnection { get; set; }
|
||||
public TimeSpan PingInterval { get; set; }
|
||||
@ -62,18 +62,18 @@ namespace CryptoExchange.Net.Implementation
|
||||
MessagesSend.Add(data);
|
||||
}
|
||||
|
||||
public void EnqueueMessage(string data)
|
||||
public async Task EnqueueMessage(string data, int wait)
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
await Task.Delay(wait);
|
||||
OnMessage?.Invoke(data);
|
||||
}
|
||||
|
||||
public void InvokeError(Exception ex, bool closeConnection)
|
||||
public async Task InvokeError(Exception ex, bool closeConnection)
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
await Task.Delay(10);
|
||||
OnError?.Invoke(ex);
|
||||
if (closeConnection)
|
||||
Close();
|
||||
await Close();
|
||||
}
|
||||
|
||||
public Task Close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user