- 博客(3)
- 收藏
- 关注
原创 linux windows 宏定义
///设置多线程和同步 #ifdef WIN32 #define WaitThread(x) {WaitForSingleObject(x, INFINITE);CloseHandle(x);} #define Notify() {SetEvent(m_hEventNotify);} #define DoSend() {SetEvent(m_hEventSend);} #else #define WaitThread(x) pthread_join(x, NULL) #define Notify()
2020-09-14 15:51:19
1177
原创 c++ 虚析构函数测试
代码如下: #include <stdio.h> class T0 { public: T0(){ printf(" T0()"); } virtual ~T0(){ printf(" ~T0()"); } }; class T00 { public: T00(){ printf(" T00()"); } ~T00(){ printf(" ~T00()"); } }; class T1 :public T0,public T00 { public:
2020-08-20 09:45:45
130
原创 简单的服务器架构
slot: 包含socket端口信息和 输入 输出缓存。 sockmgr: 作为服务器,管理客户端收发消息 。 client sockMgr: 自己有时候需要连接别的服务器,那自己就是客户端,通过该类管理自己作为客户端时的消息收发。 logicCompute: 一个死循环,无限遍历 消息列表 和 回调消息列表,进行逻辑处理,发起 socket消息回应 和 sql 请求。 QueryMgr: 处理数据库操作的, 包含 queryQueue 和 finishQueue, 从 queryQueue中取出要进行sq
2020-08-13 14:04:10
192
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人