public void EmptyHeadersShouldMatch() { IHttp2Headers headers = EmptyHttp2Headers.Instance; writer.WriteHeadersAsync(this.ctx.Object, STREAM_ID, headers, 0, true, this.ctx.Object.NewPromise()); this.ReadFrames(); this.listener.Verify( x => x.OnHeadersRead( It.Is <IChannelHandlerContext>(c => c == this.ctx.Object), It.Is <int>(id => id == STREAM_ID), It.Is <IHttp2Headers>(h => h.Equals(headers)), It.Is <int>(v => v == 0), It.Is <bool>(v => v == true))); }
/// <summary> /// Write headers via <see cref="IHttp2FrameWriter"/>. If <paramref name="hasPriority"/> is <c>false</c> it will ignore the /// <paramref name="streamDependency"/>, <paramref name="weight"/> and <paramref name="exclusive"/> parameters. /// </summary> private static Task SendHeadersAsync(IHttp2FrameWriter frameWriter, IChannelHandlerContext ctx, int streamId, IHttp2Headers headers, bool hasPriority, int streamDependency, short weight, bool exclusive, int padding, bool endOfStream, IPromise promise) { if (hasPriority) { return(frameWriter.WriteHeadersAsync(ctx, streamId, headers, streamDependency, weight, exclusive, padding, endOfStream, promise)); } return(frameWriter.WriteHeadersAsync(ctx, streamId, headers, padding, endOfStream, promise)); }
public virtual Task WriteHeadersAsync(IChannelHandlerContext ctx, int streamId, IHttp2Headers headers, int padding, bool endOfStream, IPromise promise) { return(_innerWriter.WriteHeadersAsync(ctx, streamId, headers, padding, endOfStream, promise)); }
public Task WriteHeadersAsync(IChannelHandlerContext ctx, int streamId, IHttp2Headers headers, int padding, bool endOfStream, IPromise promise) { _logger.LogHeaders(Direction.Outbound, ctx, streamId, headers, padding, endOfStream); return(_writer.WriteHeadersAsync(ctx, streamId, headers, padding, endOfStream, promise)); }