public QuicheConnectionListener(QuicheTransportContext transportContext, EndPoint endpoint) { TransportContext = transportContext; EndPoint = endpoint; _memoryPool = transportContext.MemoryPoolFactory(); var inputOptions = new PipeOptions(MemoryPool, PipeScheduler.ThreadPool, PipeScheduler.ThreadPool, 4096, 4096 / 2, useSynchronizationContext: false); var outputOptions = new PipeOptions(MemoryPool, PipeScheduler.ThreadPool, PipeScheduler.ThreadPool, 4096, 4096 / 2, useSynchronizationContext: false); var pair = DuplexPipe.CreateConnectionPair(inputOptions, outputOptions); Input = pair.Application.Output; Output = pair.Application.Input; TransportInput = pair.Transport.Input; TransportOutput = pair.Transport.Output; }
public QuicheTransportFactory(IHostApplicationLifetime applicationLifetime, ILoggerFactory loggerFactory, IOptions <QuicheTransportOptions> options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } var logger = loggerFactory.CreateLogger("Transport.Quiche"); var trace = new QuicheTrace(logger); InitializeQuiche(); _transportContext = new QuicheTransportContext(applicationLifetime, trace, options.Value); }