using CryptoExchange.Net.Authentication; using System; namespace CryptoExchange.Net.Objects.Options { /// /// Socket api options /// public class SocketApiOptions : ApiOptions { /// /// The max time of not receiving any data after which the connection is assumed to be dropped. This can only be used for socket connections where a steady flow of data is expected, /// for example when the server sends intermittent ping requests /// public TimeSpan? SocketNoDataTimeout { get; set; } /// /// The max amount of connections to make to the server. Can be used for API's which only allow a certain number of connections. Changing this to a high value might cause issues. /// public int? MaxSocketConnections { get; set; } /// /// Set the values of this options on the target options /// public T Set(T item) where T : SocketApiOptions, new() { item.OutputOriginalData = OutputOriginalData; item.SocketNoDataTimeout = SocketNoDataTimeout; item.AutoTimestamp = AutoTimestamp; item.MaxSocketConnections = MaxSocketConnections; return item; } } }