public void OnData(bool endStream, CountedSegment segment) { segment = segment.Slice(); int frameData = Frame.FrameTypeData | (endStream ? Frame.EndStream : 0); AddNewFrame(new Frame(frameData, errorCode: 0u, segment)); }
public void OnHeaders(bool endHeaders, bool endStream, CountedSegment segment) { segment = segment.Slice(); int frameData = Frame.FrameTypeHeaders | (endHeaders ? Frame.EndHeaders : 0) | (endStream ? Frame.EndStream : 0); AddNewFrame(new Frame(frameData, errorCode: 0u, segment)); }