示例#1
0
        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));
        }
示例#2
0
        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));
        }