Esempio n. 1
0
        public Http3Stream(Http3Connection http3Connection, Http3StreamContext context)
        {
            Initialize(context);

            InputRemaining = null;

            // First, determine how we know if an Http3stream is unidirectional or bidirectional
            var httpLimits  = context.ServiceContext.ServerOptions.Limits;
            var http3Limits = httpLimits.Http3;

            _http3Connection = http3Connection;
            _context         = context;

            _errorCodeFeature = _context.ConnectionFeatures.Get <IProtocolErrorCodeFeature>() !;
            _streamIdFeature  = _context.ConnectionFeatures.Get <IStreamIdFeature>() !;

            _frameWriter = new Http3FrameWriter(
                context.Transport.Output,
                context.StreamContext,
                context.TimeoutControl,
                httpLimits.MinResponseDataRate,
                context.ConnectionId,
                context.MemoryPool,
                context.ServiceContext.Log,
                _streamIdFeature);

            // ResponseHeaders aren't set, kind of ugly that we need to reset.
            Reset();

            _http3Output = new Http3OutputProducer(
                _frameWriter,
                context.MemoryPool,
                this,
                context.ServiceContext.Log);
            RequestBodyPipe = CreateRequestBodyPipe(64 * 1024); // windowSize?
            Output          = _http3Output;
            QPackDecoder    = new QPackDecoder(_context.ServiceContext.ServerOptions.Limits.Http3.MaxRequestHeaderFieldSize);
        }