📄 server.h
字号:
#ifndef SERVER_H_
#define SERVER_H_
#include <map>
#include <string>
#include "directory.h"
#include "tcpfactory.h"
class Server {
public:
~Server();
static Server* listen(int port);
static void addUser(const std::string& username, const std::string& password);
void start();
private:
static const std::string FTP_ROOT;
static TcpFactory* listenTcp;
static std::map<std::string, std::string> users;
Server(Tcp* ctrl);
bool checkPermission();
void openDataConnection();
Tcp* pi;
Tcp* data;
TcpFactory dtp;
bool logon;
bool passive;
Tcp::DataType dataType;
Directory dir;
};
#endif /*SERVER_H_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -