C# Class FubarDev.FtpServer.FtpServer

The portable FTP server
Inheritance: IDisposable
Afficher le fichier Open project: FubarDevelopment/FtpServer Class Usage Examples

Private Properties

Свойство Type Description
ConnectionOnClosed void
ConnectionReceived void
ExecuteServerListener Task
GetBackgroundTaskStates BackgroundTransferStatus>>.IReadOnlyCollection
OnConfigureConnection void

Méthodes publiques

Méthode Description
Dispose ( ) : void
EnqueueBackgroundTransfer ( [ backgroundTransfer, [ connection ) : void

Enqueue a new IBackgroundTransfer for the given connection

FtpServer ( [ fileSystemClassFactory, [ membershipProvider, [ commsInterface ) : System

Initializes a new instance of the FtpServer class.

FtpServer ( [ fileSystemClassFactory, [ membershipProvider, [ commsInterface, int port, [ handlerFactory ) : System

Initializes a new instance of the FtpServer class.

Start ( ) : void

Starts the FTP server in the background

Stop ( ) : void

Stops the FTP server

The FTP server cannot be started again after it was stopped.

Private Methods

Méthode Description
ConnectionOnClosed ( object sender, EventArgs eventArgs ) : void
ConnectionReceived ( object sender, Sockets.Plugin.Abstractions.TcpSocketListenerConnectEventArgs args ) : void
ExecuteServerListener ( AutoResetEvent e ) : Task
GetBackgroundTaskStates ( ) : BackgroundTransferStatus>>.IReadOnlyCollection
OnConfigureConnection ( FtpConnection connection ) : void

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

EnqueueBackgroundTransfer() public méthode

Enqueue a new IBackgroundTransfer for the given connection
public EnqueueBackgroundTransfer ( [ backgroundTransfer, [ connection ) : void
backgroundTransfer [ The background transfer to enqueue
connection [ The connection to enqueue the background transfer for
Résultat void

FtpServer() public méthode

Initializes a new instance of the FtpServer class.
public FtpServer ( [ fileSystemClassFactory, [ membershipProvider, [ commsInterface ) : System
fileSystemClassFactory [ The to use to create the for the logged in user.
membershipProvider [ The used to validate a login attempt
commsInterface [ The that identifies the public IP address (required for PASV and EPSV)
Résultat System

FtpServer() public méthode

Initializes a new instance of the FtpServer class.
public FtpServer ( [ fileSystemClassFactory, [ membershipProvider, [ commsInterface, int port, [ handlerFactory ) : System
fileSystemClassFactory [ The to use to create the for the logged in user.
membershipProvider [ The used to validate a login attempt
commsInterface [ The that identifies the public IP address (required for PASV and EPSV)
port int The port of the FTP server (usually 21)
handlerFactory [ The handler factories to create and instances for new objects
Résultat System

Start() public méthode

Starts the FTP server in the background
public Start ( ) : void
Résultat void

Stop() public méthode

Stops the FTP server
The FTP server cannot be started again after it was stopped.
public Stop ( ) : void
Résultat void