private Http3FrameWriter CreateFrameWriter(Pipe pipe) { var frameWriter = new Http3FrameWriter(null, null, null, _dirtyMemoryPool, null, Mock.Of <IStreamIdFeature>(), new Http3PeerSettings(), null); frameWriter.Reset(pipe.Writer, null); return(frameWriter); }
public void Initialize(Http3StreamContext context) { base.Initialize(context); InputRemaining = null; _context = context; _errorCodeFeature = _context.ConnectionFeatures.GetRequiredFeature <IProtocolErrorCodeFeature>(); _streamIdFeature = _context.ConnectionFeatures.GetRequiredFeature <IStreamIdFeature>(); _streamAbortFeature = _context.ConnectionFeatures.GetRequiredFeature <IStreamAbortFeature>(); _appCompletedTaskSource.Reset(); _isClosed = 0; _requestHeaderParsingState = default; _parsedPseudoHeaderFields = default; _totalParsedHeaderSize = 0; _isMethodConnect = false; _completionState = default; StreamTimeoutTicks = 0; if (_frameWriter == null) { _frameWriter = new Http3FrameWriter( context.StreamContext, context.TimeoutControl, context.ServiceContext.ServerOptions.Limits.MinResponseDataRate, context.MemoryPool, context.ServiceContext.Log, _streamIdFeature, context.ClientPeerSettings, this); _http3Output = new Http3OutputProducer( _frameWriter, context.MemoryPool, this, context.ServiceContext.Log); Output = _http3Output; RequestBodyPipe = CreateRequestBodyPipe(64 * 1024); // windowSize? QPackDecoder = new QPackDecoder(_context.ServiceContext.ServerOptions.Limits.Http3.MaxRequestHeaderFieldSize); } else { _http3Output.StreamReset(); RequestBodyPipe.Reset(); QPackDecoder.Reset(); } _frameWriter.Reset(context.Transport.Output, context.ConnectionId); }
public Http3ControlStream(Http3StreamContext context) { var httpLimits = context.ServiceContext.ServerOptions.Limits; _context = context; _serverPeerSettings = context.ServerPeerSettings; _streamIdFeature = context.ConnectionFeatures.GetRequiredFeature <IStreamIdFeature>(); _errorCodeFeature = context.ConnectionFeatures.GetRequiredFeature <IProtocolErrorCodeFeature>(); _headerType = -1; _frameWriter = new Http3FrameWriter( context.StreamContext, context.TimeoutControl, httpLimits.MinResponseDataRate, context.MemoryPool, context.ServiceContext.Log, _streamIdFeature, context.ClientPeerSettings, this); _frameWriter.Reset(context.Transport.Output, context.ConnectionId); }