Add ABOR command

This commit is contained in:
2019-07-27 20:23:18 +02:00
parent bf42471fe5
commit 351030ebcd
2 changed files with 22 additions and 0 deletions

View 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.");
}
}
}

View File

@@ -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(),