Show / Hide Table of Contents

    Class DefaultSslStreamWrapperFactory

    The default implementation of the ISslStreamWrapperFactory interface.

    Inheritance
    Object
    DefaultSslStreamWrapperFactory
    Implements
    ISslStreamWrapperFactory
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: FubarDev.FtpServer.Authentication
    Assembly: FubarDev.FtpServer.dll
    Syntax
    public class DefaultSslStreamWrapperFactory : ISslStreamWrapperFactory

    Constructors

    | Improve this Doc View Source

    DefaultSslStreamWrapperFactory(Nullable<ILogger<DefaultSslStreamWrapperFactory>>)

    Initializes a new instance of the DefaultSslStreamWrapperFactory class.

    Declaration
    public DefaultSslStreamWrapperFactory(ILogger<DefaultSslStreamWrapperFactory>? logger = default(ILogger<DefaultSslStreamWrapperFactory>? ))
    Parameters
    Type Name Description
    Nullable<ILogger<DefaultSslStreamWrapperFactory>> logger

    The logger.

    Methods

    | Improve this Doc View Source

    CloseStreamAsync(Stream, CancellationToken)

    Close the SslStream gracefully (if possible).

    Declaration
    public Task CloseStreamAsync(Stream sslStream, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Stream sslStream

    The SslStream to close.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The task.

    | Improve this Doc View Source

    CreateSslStream(Stream, Boolean)

    Create a new SslStream instance.

    Declaration
    protected virtual SslStream CreateSslStream(Stream unencryptedStream, bool keepOpen)
    Parameters
    Type Name Description
    Stream unencryptedStream

    The stream to wrap in an SslStream instance.

    Boolean keepOpen

    Keep the inner stream open.

    Returns
    Type Description
    SslStream

    The new SslStream.

    | Improve this Doc View Source

    WrapStreamAsync(Stream, Boolean, X509Certificate, CancellationToken)

    Wraps the unencrypted stream in an SslStream.

    Declaration
    public Task<Stream> WrapStreamAsync(Stream unencryptedStream, bool keepOpen, X509Certificate certificate, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Stream unencryptedStream

    The unencrypted stream.

    Boolean keepOpen

    Keep the unencryptedStream open when the SslStream gets disposed.

    X509Certificate certificate

    The certificate to be used to authenticate as server.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<Stream>

    The SslStream that wraps the unencryptedStream.

    Implements

    ISslStreamWrapperFactory
    • Improve this Doc
    • View Source
    Back to top
    Copyright © 2018 Fubar Development Junker
    Generated by DocFX
    Creative Commons License
    FluentMigrator Documentation by FluentMigrator Project is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.