Example #1
0
        /// <summary>
        /// Create a new instance of HuobiSocketClient using provided options
        /// </summary>
        /// <param name="options">The options to use for this client</param>
        public HuobiSocketClient(HuobiSocketClientOptions options) : base(options, options.ApiCredentials == null ? null : new HuobiAuthenticationProvider(options.ApiCredentials, false))
        {
            baseAddressAuthenticated = options.BaseAddressAuthenticated;

            SetDataInterpreter(DecompressData, null);
            AddGenericHandler("PingV1", PingHandlerV1);
            AddGenericHandler("PingV2", PingHandlerV2);
        }
Example #2
0
 /// <summary>
 /// Set the default options to be used when creating new socket clients
 /// </summary>
 /// <param name="options">The options to use for new clients</param>
 public static void SetDefaultOptions(HuobiSocketClientOptions options)
 {
     defaultOptions = options;
 }
        /// <summary>
        /// Create a new instance of HuobiSocketClient using provided options
        /// </summary>
        /// <param name="options">The options to use for this client</param>
        public HuobiSocketClient(HuobiSocketClientOptions options) : base(options, options.ApiCredentials == null ? null : new HuobiAuthenticationProvider(options.ApiCredentials))
        {
            Configure(options);

            SetDataInterpreter(DecompressData);
        }
 private void Configure(HuobiSocketClientOptions options)
 {
     baseAddressAuthenticated = options.BaseAddressAuthenticated;
     socketResponseTimeout    = (int)Math.Round(options.SocketResponseTimeout.TotalMilliseconds);
 }
Example #5
0
 private void Configure(HuobiSocketClientOptions options)
 {
     baseAddressAuthenticated = options.BaseAddressAuthenticated;
 }