internal VirtualStateParser Parse() { var isOutOfContent = false; while (!HasCompleted) { if (IsNotStarted) { isOutOfContent = NextStep(); } else if (IsStatusLineStep) { isOutOfContent = ParseStatusLine(); } else if (IsHeadersStep) { isOutOfContent = ParseHeaders(); } else if (IsBodyStep) { isOutOfContent = ParseBody(); } else if (IsCompletedStep) { _continuation = false; isOutOfContent = NewResponse(); } if (isOutOfContent) { _continuation = true; _outOfContentTime = (long)DateExtensions.GetCurrentMillis(); return(this); } } PrepareForStream(); return(this); }
internal bool HasMissingContentTimeExpired(long timeLimit) => _outOfContentTime + timeLimit < DateExtensions.GetCurrentMillis();