40 references to HeaderWriteResult
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (40)
Http2\Http2HPackEncoderTests.cs (22)
25
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length));
48
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length));
76
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length));
118
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(307, hpackEncoder, enumerator, buffer, out length));
159
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out length));
220
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(302, hpackEncoder, enumerator, buffer, out var length));
262
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(307, hpackEncoder, enumerator, buffer, out length));
303
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out length));
361
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out _));
387
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out var length));
476
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(statusCode.Value, hpackEncoder, GetHeadersEnumerator(headers), payload, out length));
480
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, GetHeadersEnumerator(headers), payload, out length));
542
Assert.Equal(
HeaderWriteResult
.MoreHeaders, HPackHeaderWriter.BeginEncodeHeaders(statusCode, hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out var length));
549
Assert.Equal(
HeaderWriteResult
.MoreHeaders, HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length));
556
Assert.Equal(
HeaderWriteResult
.MoreHeaders, HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length));
563
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.ContinueEncodeHeaders(hpackEncoder, headerEnumerator, payload.Slice(offset, sliceLength), out length));
580
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out var length));
594
Assert.Equal(
HeaderWriteResult
.Done, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out length));
610
Assert.Equal(
HeaderWriteResult
.MoreHeaders, HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out var length));
625
Assert.Equal(
HeaderWriteResult
.BufferTooSmall, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out var length));
640
Assert.Equal(
HeaderWriteResult
.MoreHeaders, HPackHeaderWriter.BeginEncodeHeaders(200, hpackEncoder, enumerator, buffer, out var length));
656
Assert.Equal(
HeaderWriteResult
.MoreHeaders, HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, enumerator, buffer, out var length));
src\Servers\Kestrel\shared\HPackHeaderWriter.cs (13)
32
public static
HeaderWriteResult
BeginEncodeHeaders(int statusCode, DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, out int length)
50
return
HeaderWriteResult
.Done;
55
var
done = EncodeHeadersCore(hpackEncoder, headersEnumerator, buffer.Slice(length), canRequestLargerBuffer: false, out var headersLength);
63
public static
HeaderWriteResult
BeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, out int length) =>
69
public static
HeaderWriteResult
RetryBeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, out int length) =>
75
private static
HeaderWriteResult
BeginEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, bool iterateBeforeFirstElement, out int length)
87
return
HeaderWriteResult
.Done;
90
var
done = EncodeHeadersCore(hpackEncoder, headersEnumerator, buffer.Slice(length), canRequestLargerBuffer: true, out var headersLength);
98
public static
HeaderWriteResult
ContinueEncodeHeaders(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, out int length)
118
private static
HeaderWriteResult
EncodeHeadersCore(DynamicHPackEncoder hpackEncoder, Http2HeadersEnumerator headersEnumerator, Span<byte> buffer, bool canRequestLargerBuffer, out int length)
146
return
HeaderWriteResult
.BufferTooSmall;
149
return
HeaderWriteResult
.MoreHeaders;
156
return
HeaderWriteResult
.Done;
src\Servers\Kestrel\shared\test\PipeWriterHttp2FrameExtensions.cs (5)
13
using HeaderWriteResult = Microsoft.AspNetCore.Server.Kestrel.Core.Tests.
HeaderWriteResult
;
37
var
done = HPackHeaderWriter.BeginEncodeHeaders(hpackEncoder, headers, buffer, out var length);
40
if (done ==
HeaderWriteResult
.Done)
53
while (done !=
HeaderWriteResult
.Done)
60
if (done ==
HeaderWriteResult
.Done)