/// <summary> /// new /// </summary> /// <param name="client"></param> /// <param name="millisecondsSendTimeout"></param> public PendingSendQueue(BaseSocketClient <TResponse> client, int millisecondsSendTimeout) { this._client = client; this._timeout = millisecondsSendTimeout; this._timer = new Timer(_ => { this._timer.Change(Timeout.Infinite, Timeout.Infinite); this.Loop(); this._timer.Change(1000, 0); }, null, 1000, 0); }
/// <summary> /// new /// </summary> /// <param name="client"></param> /// <param name="millisecondsReceiveTimeout"></param> public RequestCollection(BaseSocketClient <TResponse> client, int millisecondsReceiveTimeout) { this._client = client; this._timeout = millisecondsReceiveTimeout; this._timer = new Timer(_ => { this._timer.Change(Timeout.Infinite, Timeout.Infinite); this.Loop(); this._timer.Change(1000, 0); }, null, 1000, 0); }