Show / Hide Table of Contents

    Interface IFtpConnection

    The interface for an FTP connection.

    Inherited Members
    IConnectionFeature.LocalEndPoint
    IConnectionFeature.RemoteEndPoint
    IConnectionFeature.RemoteAddress
    IDisposable.Dispose()
    Namespace: FubarDev.FtpServer
    Assembly: FubarDev.FtpServer.Abstractions.dll
    Syntax
    public interface IFtpConnection : IConnectionFeature, IDisposable

    Properties

    | Improve this Doc View Source

    ConnectionServices

    Gets the connection services.

    Declaration
    IServiceProvider ConnectionServices { get; }
    Property Value
    Type Description
    IServiceProvider
    | Improve this Doc View Source

    Data

    Gets the FTP connection data.

    Declaration
    [Obsolete("Query the information using the Features property instead.")]
    FtpConnectionData Data { get; }
    Property Value
    Type Description
    FtpConnectionData
    | Improve this Doc View Source

    Encoding

    Gets or sets the encoding for the LIST/NLST commands.

    Declaration
    [Obsolete("Query the information using the IEncodingFeature instead.")]
    Encoding Encoding { get; set; }
    Property Value
    Type Description
    Encoding
    | Improve this Doc View Source

    Features

    Gets the feature collection.

    Declaration
    IFeatureCollection Features { get; }
    Property Value
    Type Description
    IFeatureCollection
    | Improve this Doc View Source

    IsSecure

    Gets a value indicating whether this is a secure connection.

    Declaration
    [Obsolete("Query the information using the ISecureConnectionFeature instead.")]
    bool IsSecure { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Log

    Gets the FTP connection logger.

    Declaration
    [Obsolete("Use your own logger instead of the one from the connection.")]
    ILogger? Log { get; }
    Property Value
    Type Description
    Nullable<ILogger>
    | Improve this Doc View Source

    OriginalStream

    Gets the control connection stream.

    Declaration
    [Obsolete("Query the information using the ISecureConnectionFeature instead.")]
    Stream OriginalStream { get; }
    Property Value
    Type Description
    Stream
    | Improve this Doc View Source

    SocketStream

    Gets or sets the control connection stream.

    Declaration
    [Obsolete("Query the information using the ISecureConnectionFeature instead.")]
    Stream SocketStream { get; set; }
    Property Value
    Type Description
    Stream

    Methods

    | Improve this Doc View Source

    CreateEncryptedStream(Stream)

    Create an encrypted stream.

    Declaration
    [Obsolete("The data connection returned by OpenDataConnection is already encrypted.")]
    Task<Stream> CreateEncryptedStream(Stream unencryptedStream)
    Parameters
    Type Name Description
    Stream unencryptedStream

    The stream to encrypt.

    Returns
    Type Description
    Task<Stream>

    The encrypted stream.

    | Improve this Doc View Source

    OpenDataConnectionAsync(Nullable<TimeSpan>, CancellationToken)

    Creates a response socket for e.g. LIST/NLST.

    Declaration
    Task<IFtpDataConnection> OpenDataConnectionAsync(TimeSpan? timeout = default(TimeSpan? ), CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Nullable<TimeSpan> timeout

    The timeout for establishing a data connection.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<IFtpDataConnection>

    The data connection.

    | Improve this Doc View Source

    StartAsync()

    Starts processing of messages for this connection.

    Declaration
    Task StartAsync()
    Returns
    Type Description
    Task

    The task.

    | Improve this Doc View Source

    StopAsync()

    Closes the connection.

    Declaration
    Task StopAsync()
    Returns
    Type Description
    Task

    The task.

    | Improve this Doc View Source

    WriteAsync(IFtpResponse, CancellationToken)

    Writes a FTP response to a client.

    Declaration
    [Obsolete("Use the FtpCommandHandler.CommandContext.ServerCommandWriter or FtpCommandHandlerExtension.CommandContext.ServerCommandWriter instead.")]
    Task WriteAsync(IFtpResponse response, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IFtpResponse response

    The response to write to the client.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The task.

    | Improve this Doc View Source

    WriteAsync(String, CancellationToken)

    Writes response to a client.

    Declaration
    [Obsolete("Use the FtpCommandHandler.CommandContext.ServerCommandWriter or FtpCommandHandlerExtension.CommandContext.ServerCommandWriter instead.")]
    Task WriteAsync(string response, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    String response

    The response to write to the client.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The task.

    Events

    | Improve this Doc View Source

    Closed

    Gets or sets the event handler that is triggered when the connection is closed.

    Declaration
    event EventHandler? Closed
    Event Type
    Type Description
    Nullable<EventHandler>

    Extension Methods

    ConnectionExtensions.ExecuteCommand(IFtpConnection, FtpCommand, Func<FtpCommand, CancellationToken, Task<Nullable<IFtpResponse>>>, Nullable<ILogger>, CancellationToken)
    • 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.