C# Class FubarDev.FtpServer.FtpServer

The portable FTP server
Inheritance: IDisposable
Exibir arquivo Open project: FubarDevelopment/FtpServer Class Usage Examples

Private Properties

Property Type Description
ConnectionOnClosed void
ConnectionReceived void
ExecuteServerListener Task
GetBackgroundTaskStates BackgroundTransferStatus>>.IReadOnlyCollection
OnConfigureConnection void

Public Methods

Method 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

Method 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 method

public Dispose ( ) : void
return void

EnqueueBackgroundTransfer() public method

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
return void

FtpServer() public method

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)
return System

FtpServer() public method

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
return System

Start() public method

Starts the FTP server in the background
public Start ( ) : void
return void

Stop() public method

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