Class FtpServerHost
Simple IFtpServerHost implementation.
Implements
Inherited Members
Namespace: FubarDev.FtpServer
Assembly: FubarDev.FtpServer.dll
Syntax
public class FtpServerHost : IFtpServerHost
Remarks
This services is used to start and stop all IFtpService instances.
Constructors
| Improve this Doc View SourceFtpServerHost(IEnumerable<IFtpService>)
Initializes a new instance of the FtpServerHost class.
Declaration
public FtpServerHost(IEnumerable<IFtpService> ftpServices)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IFtpService> | ftpServices | The FTP services to start and stop. |
Methods
| Improve this Doc View SourceStartAsync(CancellationToken)
Must be called to start the FTP server host.
Declaration
public Task StartAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | Indicates that the start process has been aborted. |
Returns
Type | Description |
---|---|
Task | The task. |
Remarks
Starts all FTP server services.
StopAsync(CancellationToken)
Must be called for a graceful shutdown of the FTP server host.
Declaration
public Task StopAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | Indicates that the shutdown process should no longer be graceful. |
Returns
Type | Description |
---|---|
Task | The task. |
Remarks
Stops all FTP server services.