server.h
来自「c++编写的FTP服务器和客户端程序」· C头文件 代码 · 共 39 行
H
39 行
#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 + =
减小字号Ctrl + -
显示快捷键?