public TcpClientChannel(SchedulerAllocator allocator, MemoryPool <byte> memoryPool, TcpClientOptions options, Action <IFilterPipeline <ITcpSession> > handler, SslFeature sslFeature) : base(handler, sslFeature, options) { this.memoryPool = memoryPool; this.schedulerAllocator = allocator; }
public void ConfigurationSsl(SslOptions sslOptions, Func <Stream, SslStream> sslStreamFactory) { if (sslOptions == null) { throw new ArgumentNullException(nameof(sslOptions)); } if (sslStreamFactory == null) { throw new ArgumentNullException(nameof(sslStreamFactory)); } this.sslFeature = new SslFeature(sslOptions, sslStreamFactory); }
public ATcpChannel(Action <IFilterPipeline <ITcpSession> > handler, SslFeature sslFeature, TOptions options) { base.ConfigurationSelfOptions(options); base.ConfigurationSelfFilter(handler); this.sslFeature = sslFeature; if (sslFeature == null) { this.createSession = CreateSession; } else { this.createSession = CreateSslSession; } }
protected override Task <ITcpServerChannel> ChannelFactoryAsync(TcpServerOptions options, Action <IFilterPipeline <ITcpSession> > handler, SslFeature sslFeature) { return(Task.FromResult((ITcpServerChannel) new TcpServerChannel(options, handler, sslFeature))); }
public TcpSslSession(Socket socket, ATcpOptions options, PipeScheduler scheduler, MemoryPool <byte> pool, SslFeature sslFeature, FilterPipeline <ITcpSession> filterPipeline) : base(socket, options, scheduler, pool, filterPipeline) { var inputPipeOptions = StreamPipeOptionsHelper.ReaderOptionsCreator(pool); var outputPipeOptions = StreamPipeOptionsHelper.WriterOptionsCreator(pool); var sslDuplexPipe = new SslStreamDuplexPipe(base.Transport, inputPipeOptions, outputPipeOptions, sslFeature.sslStreamFactory); this.sslTransport = sslDuplexPipe; this.sslOptions = sslFeature.sslOptions; }
protected override Task <ITcpClientChannel> ChannelFactoryAsync(TcpClientOptions options, Action <IFilterPipeline <ITcpSession> > handler, SslFeature sslFeature) { return(Task.FromResult((ITcpClientChannel) new TcpClientChannel(this.schedulerAllocator, this.memoryPool, options, handler, sslFeature))); }
public TcpServerChannel(TcpServerOptions options, Action <IFilterPipeline <ITcpSession> > handler, SslFeature sslFeature) : base(handler, sslFeature, options) { this.memoryPool = SlabMemoryPoolFactory.Create(this.options.MemoryPoolOptions); this.schedulerAllocator = new SchedulerAllocator(this.options.SchedulerCount); }
protected abstract Task <TChannel> ChannelFactoryAsync(TOptions options, Action <IFilterPipeline <ITcpSession> > handler, SslFeature sslFeature);