-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFTP_Client.h
More file actions
35 lines (34 loc) · 946 Bytes
/
FTP_Client.h
File metadata and controls
35 lines (34 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*************************************************************************
> File Name: FTP_Client.h
> Author: MidCHeck
> Mail: midcheck@foxmail.com
> Created Time: 2019年06月29日 星期六 13时41分54秒
************************************************************************/
#ifndef MIDCHECK_FTP_CLIENT_H
#define MIDCHECK_FTP_CLIENT_H
#include <unordered_map>
#include <sys/sendfile.h>
#include "socket.h"
#include "FTP_User.h"
#include "passwd.h"
namespace MidCHeck{
class FTP_Client: public User, public Socket{
private:
std::vector<std::string> history;
std::unordered_map<COMMAND, std::string> cmd_help;
std::unordered_map<std::string, COMMAND> cmd_map;
public:
FTP_Client(const char* ip, int port = 21);
~FTP_Client();
COMMAND parse();
void package();
void start();
void CmdHelp();
void CmdUser();
void CmdList();
void CmdRetr();
void CmdStor();
void CmdQuit();
};
} // end namespace MidCHeck
#endif