⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 server.h

📁 基于Linux下Epoll技术的EchoSvr
💻 H
字号:
/// 
/// @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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -