23 references to VariableLengthIntegerHelper
Microsoft.AspNetCore.Server.Kestrel.Core (23)
Internal\Http3\Http3Connection.cs (1)
706SendGoAwayAsync(VariableLengthIntegerHelper.EightByteLimit).Preserve();
Internal\Http3\Http3ControlStream.cs (3)
162var id = VariableLengthIntegerHelper.GetInteger(readableBuffer, out consumed, out examined); 336var id = VariableLengthIntegerHelper.GetInteger(payload, out var consumed, out _); 344var value = VariableLengthIntegerHelper.GetInteger(payload, out consumed, out _);
Internal\Http3\Http3FrameReader.cs (2)
27var type = VariableLengthIntegerHelper.GetInteger(readableBuffer, out consumed, out _); 35var length = VariableLengthIntegerHelper.GetInteger(firstLengthBuffer, out consumed, out _);
Internal\Http3\Http3FrameWriter.cs (11)
106var buffer = _outputWriter.GetSpan(settingsLength + VariableLengthIntegerHelper.MaximumEncodedLength + 1); 116var settingsBytesWritten = VariableLengthIntegerHelper.WriteInteger(buffer, settingsLength); 135length += VariableLengthIntegerHelper.GetByteCount((long)setting.Parameter); 136length += VariableLengthIntegerHelper.GetByteCount(setting.Value); 145var parameterLength = VariableLengthIntegerHelper.WriteInteger(destination, (long)setting.Parameter); 148var valueLength = VariableLengthIntegerHelper.WriteInteger(destination, (long)setting.Value); 156_outputWriter.Advance(VariableLengthIntegerHelper.WriteInteger(buffer, id)); 241var length = VariableLengthIntegerHelper.GetByteCount(id); 248VariableLengthIntegerHelper.WriteInteger(buffer, id); 284var typeLength = VariableLengthIntegerHelper.WriteInteger(buffer, (int)frameType); 288var lengthLength = VariableLengthIntegerHelper.WriteInteger(buffer, (int)frameLength);
Internal\Http3\Http3PendingStream.cs (1)
63var value = VariableLengthIntegerHelper.GetInteger(readableBuffer, out consumed, out _);
src\Shared\runtime\Http3\Frames\Http3Frame.cs (5)
10public const int MaximumEncodedFrameEnvelopeLength = 1 + VariableLengthIntegerHelper.MaximumEncodedLength; // Frame type + payload length. 17if (VariableLengthIntegerHelper.TryRead(buffer, out a, out int aLength)) 20if (VariableLengthIntegerHelper.TryRead(buffer, out b, out int bLength)) 43Debug.Assert(VariableLengthIntegerHelper.GetByteCount((long)frameType) == 1, $"{nameof(TryWriteFrameEnvelope)} assumes {nameof(frameType)} will fit within a single byte varint."); 50if (VariableLengthIntegerHelper.TryWrite(buffer, payloadLength, out int payloadLengthEncodedLength))