Add ABOR command
This commit is contained in:
21
DearFTP/Connection/Commands/AbortCommand.cs
Normal file
21
DearFTP/Connection/Commands/AbortCommand.cs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace DearFTP.Connection.Commands
|
||||||
|
{
|
||||||
|
class AbortCommand : ICommand
|
||||||
|
{
|
||||||
|
public string[] Aliases { get; } = new string[]
|
||||||
|
{
|
||||||
|
"ABOR"
|
||||||
|
};
|
||||||
|
|
||||||
|
public void Execute(Session session, FtpStream stream, string alias, string argument)
|
||||||
|
{
|
||||||
|
session.DataConnection.Close();
|
||||||
|
|
||||||
|
stream.Send(ResponseCode.CloseDataConnection, "Data connection closed.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ namespace DearFTP.Connection.Commands
|
|||||||
{
|
{
|
||||||
public ICommand[] Commands { get; } = new ICommand[]
|
public ICommand[] Commands { get; } = new ICommand[]
|
||||||
{
|
{
|
||||||
|
new AbortCommand(),
|
||||||
new AuthCommand(),
|
new AuthCommand(),
|
||||||
new ClntCommand(),
|
new ClntCommand(),
|
||||||
new CwdCommand(),
|
new CwdCommand(),
|
||||||
|
|||||||
Reference in New Issue
Block a user