24 references to VariableLengthIntegerHelper
Microsoft.AspNetCore.Server.Kestrel.Core (24)
Internal\Http3\Http3Connection.cs (1)
706SendGoAwayAsync(VariableLengthIntegerHelper.EightByteLimit).Preserve();
Internal\Http3\Http3ControlStream.cs (4)
168if (VariableLengthIntegerHelper.TryGetInteger(readableBuffer, out consumed, out var id)) 384if (!VariableLengthIntegerHelper.TryGetInteger(payload, out consumed, out var id)) 389if (!VariableLengthIntegerHelper.TryGetInteger(payload.Slice(consumed), out consumed, out var value)) 490if (!VariableLengthIntegerHelper.TryGetInteger(payload, out consumed, out _))
Internal\Http3\Http3FrameReader.cs (2)
32if (!VariableLengthIntegerHelper.TryGetInteger(readableBuffer, out consumed, out var type)) 39if (!VariableLengthIntegerHelper.TryGetInteger(firstLengthBuffer, out consumed, out length))
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)
63if (VariableLengthIntegerHelper.TryGetInteger(readableBuffer, out consumed, out var value))
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))