コード例 #1
0
        public async Task Invoke(TcpContext context)
        {
            var sslStream = new SslStream(context.Body);

            await sslStream.AuthenticateAsServerAsync(_cert);

            context.Body = sslStream;

            await _next(context);
        }
コード例 #2
0
        public Task Invoke(TcpContext context)
        {
            context.Body = new LoggingStream(context.Body, _logger);

            return _next(context);
        }