mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-16 02:43:00 +00:00
Added KeepAliveInterval setting for socket connections
This commit is contained in:
@@ -122,6 +122,9 @@ namespace CryptoExchange.Net.Sockets
|
||||
/// <inheritdoc />
|
||||
public TimeSpan Timeout { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public TimeSpan KeepAliveInterval { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public double IncomingKbps
|
||||
{
|
||||
@@ -332,7 +335,7 @@ namespace CryptoExchange.Net.Sockets
|
||||
socket.Options.Cookies = cookieContainer;
|
||||
foreach (var header in headers)
|
||||
socket.Options.SetRequestHeader(header.Key, header.Value);
|
||||
socket.Options.KeepAliveInterval = TimeSpan.FromSeconds(10);
|
||||
socket.Options.KeepAliveInterval = KeepAliveInterval;
|
||||
socket.Options.SetBuffer(65536, 65536); // Setting it to anything bigger than 65536 throws an exception in .net framework
|
||||
return socket;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user