1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-20 21:02:55 +00:00
This commit is contained in:
JKorf
2019-10-20 13:36:38 +02:00
parent 8ec902951d
commit b2b5b0fef0
28 changed files with 819 additions and 237 deletions
+8 -4
View File
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
@@ -20,10 +21,6 @@ namespace CryptoExchange.Net.Interfaces
/// </summary>
string? Content { get; }
/// <summary>
/// Headers
/// </summary>
HttpRequestHeaders Headers { get; }
/// <summary>
/// Method
/// </summary>
HttpMethod Method { get; set; }
@@ -42,6 +39,13 @@ namespace CryptoExchange.Net.Interfaces
/// <param name="data"></param>
/// <param name="contentType"></param>
void SetContent(string data, string contentType);
/// <summary>
/// Add a header to the request
/// </summary>
/// <param name="key"></param>
/// <param name="value"></param>
void AddHeader(string key, string value);
/// <summary>
/// Get the response
/// </summary>
+3 -2
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using CryptoExchange.Net.Objects;
using CryptoExchange.Net.RateLimiter;
@@ -51,12 +52,12 @@ namespace CryptoExchange.Net.Interfaces
/// Ping to see if the server is reachable
/// </summary>
/// <returns>The roundtrip time of the ping request</returns>
CallResult<long> Ping();
CallResult<long> Ping(CancellationToken ct = default);
/// <summary>
/// Ping to see if the server is reachable
/// </summary>
/// <returns>The roundtrip time of the ping request</returns>
Task<CallResult<long>> PingAsync();
Task<CallResult<long>> PingAsync(CancellationToken ct = default);
}
}
@@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
using CryptoExchange.Net.Objects;
using CryptoExchange.Net.Sockets;
namespace CryptoExchange.Net.Interfaces
@@ -29,6 +30,20 @@ namespace CryptoExchange.Net.Interfaces
/// </summary>
string BaseAddress { get; }
/// <inheritdoc cref="SocketClientOptions.SocketResponseTimeout"/>
TimeSpan ResponseTimeout { get; }
/// <inheritdoc cref="SocketClientOptions.SocketNoDataTimeout"/>
TimeSpan SocketNoDataTimeout { get; }
/// <summary>
/// The max amount of concurrent socket connections
/// </summary>
int MaxSocketConnections { get; }
/// <inheritdoc cref="SocketClientOptions.SocketSubscriptionsCombineTarget"/>
int SocketCombineTarget { get; }
/// <summary>
/// Unsubscribe from a stream
/// </summary>