Class FtpLoginStateMachine
A state machine for FTP logins.
Inherited Members
Namespace: FubarDev.FtpServer
Assembly: FubarDev.FtpServer.Abstractions.dll
Syntax
public class FtpLoginStateMachine : FtpStateMachine<SecurityStatus>, IFtpLoginStateMachine, IFtpStateMachine<SecurityStatus>
Constructors
| Improve this Doc View SourceFtpLoginStateMachine(IFtpConnection, IFtpHostSelector)
Initializes a new instance of the FtpLoginStateMachine class.
Declaration
public FtpLoginStateMachine(IFtpConnection connection, IFtpHostSelector hostSelector)
Parameters
Type | Name | Description |
---|---|---|
IFtpConnection | connection | The FTP connection. |
IFtpHostSelector | hostSelector | The FTP host selector. |
Properties
| Improve this Doc View SourceSelectedAuthenticationMechanism
Declaration
public IAuthenticationMechanism? SelectedAuthenticationMechanism { get; }
Property Value
Type | Description |
---|---|
Nullable<IAuthenticationMechanism> |
SelectedAuthorizationMechanism
Declaration
public IAuthorizationMechanism? SelectedAuthorizationMechanism { get; }
Property Value
Type | Description |
---|---|
Nullable<IAuthorizationMechanism> |
SelectedHost
Gets the selected host.
Declaration
public IFtpHost SelectedHost { get; }
Property Value
Type | Description |
---|---|
IFtpHost |
Methods
| Improve this Doc View SourceActivate(IAuthenticationMechanism)
Declaration
public void Activate(IAuthenticationMechanism authenticationMechanism)
Parameters
Type | Name | Description |
---|---|---|
IAuthenticationMechanism | authenticationMechanism |
ExecuteCommandAsync(FtpCommand, CancellationToken)
Declaration
protected override Task<IFtpResponse? > ExecuteCommandAsync(FtpCommand ftpCommand, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
FtpCommand | ftpCommand | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<Nullable<IFtpResponse>> |
Overrides
FubarDev.FtpServer.FtpStateMachine<FubarDev.FtpServer.SecurityStatus>.ExecuteCommandAsync(FubarDev.FtpServer.FtpCommand, System.Threading.CancellationToken)
|
Improve this Doc
View Source
OnStatusChanged(SecurityStatus, SecurityStatus)
Declaration
protected override void OnStatusChanged(SecurityStatus from, SecurityStatus to)
Parameters
Type | Name | Description |
---|---|---|
SecurityStatus | from | |
SecurityStatus | to |
Overrides
FubarDev.FtpServer.FtpStateMachine<FubarDev.FtpServer.SecurityStatus>.OnStatusChanged(FubarDev.FtpServer.SecurityStatus, FubarDev.FtpServer.SecurityStatus)
|
Improve this Doc
View Source
Reset()
Declaration
public override void Reset()
Overrides
FubarDev.FtpServer.FtpStateMachine<FubarDev.FtpServer.SecurityStatus>.Reset()
|
Improve this Doc
View Source
UnhandledCommandAsync(FtpCommand, CancellationToken)
Called when the command couldn't be handled.
Declaration
protected virtual Task<IFtpResponse> UnhandledCommandAsync(FtpCommand ftpCommand, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
FtpCommand | ftpCommand | The FTP command causing the problem. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IFtpResponse> | The FTP response to be returned. |