server.h
来自「基于Linux下Epoll技术的EchoSvr」· C头文件 代码 · 共 47 行
H
47 行
///
/// @file Server.h
/// @brief 服务器框架基篿/// @author guozhiming
/// @date 2007-05-24
///
#ifndef __SERVER__
#define __SERVER__
#include "def.h"
#include "ThreadPool.h"
class G_Server
{
public:
/// @brief 析构函数
~G_Server();
/// @brief 初始化服务器程序字类需要继承这个函擿 ///
/// @return
bool init();
/// @brief 结束服务器程序回收资渿 // virtual void final() = 0;
static G_Server *getInstance()
{
if(!instance)
{
instance = new G_Server();
}
return instance;
}
protected:
/// @brief 构造函擿 G_Server();
G_Server();
private:
static G_Server *instance ;
G_ThreadPool *g_threadPool;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?