client.h
来自「c++编写的FTP服务器和客户端程序」· C头文件 代码 · 共 44 行
H
44 行
#ifndef CLIENT_H_
#define CLIENT_H_
#include "directory.h"
#include "tcpfactory.h"
class Client {
public:
Client(const std::string& addr, int port = 21);
~Client();
int user(const std::string& username = "anonymous");
int pass(const std::string& password);
int cwd(const std::string& path);
int cdup();
int quit();
int port(int port);
int pasv();
int type(Tcp::DataType type);
int stor(const std::string& filename);
int retr(const std::string& filename);
int appe(const std::string& filename);
int list(const std::string& path = "");
int pwd(Directory& dir);
int abor();
int syst();
int help(const std::string& command = "");
bool connect(Client* host);
bool transfer(Client* host, const std::string& filename);
private:
int getReply(std::string& reply);
void openDataConnection();
Tcp* pi;
Tcp* data;
TcpFactory dtp;
bool passive;
Tcp::DataType dataType;
};
#endif /*CLIENT_H_*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?