1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-18 20:02:57 +00:00

Added support for retrieving a reconnection url when socket connection is lost

This commit is contained in:
JKorf
2022-07-17 12:49:13 +02:00
parent 7c8cbfa4e2
commit 465e9f04f4
6 changed files with 71 additions and 24 deletions
@@ -543,6 +543,17 @@ namespace CryptoExchange.Net
return Task.FromResult(new CallResult<string?>(address));
}
/// <summary>
/// Get the url to reconnect to after losing a connection
/// </summary>
/// <param name="apiClient"></param>
/// <param name="connection"></param>
/// <returns></returns>
public virtual Task<Uri?> GetReconnectUriAsync(SocketApiClient apiClient, SocketConnection connection)
{
return Task.FromResult<Uri?>(connection.ConnectionUri);
}
/// <summary>
/// Gets a connection for a new subscription or query. Can be an existing if there are open position or a new one.
/// </summary>