public async Task Invoke(TcpContext context) { var sslStream = new SslStream(context.Body); await sslStream.AuthenticateAsServerAsync(_cert); context.Body = sslStream; await _next(context); }
public Task Invoke(TcpContext context) { context.Body = new LoggingStream(context.Body, _logger); return _next(context); }