ZZDNet分布式网络通信软件
北京执竹科技有限公司
 
载入中...
搜索中...
未找到
ZZDNetServer.h
浏览该文件的文档.
1
10#pragma once
11#include "ZZDNetExports.h"
12#include "ZZDNetServerDef.h"
13class ZZServerCore;
15{
16public:
25 ZZDNetServer(const char *netName, const char *ip, int port, const char *mbip, int mbport);
26
31
36 bool startService(const char *lic);
37
42
46 bool tick();
47
52 void enableLog(bool enable, bool print);
53
60
67
74
79 void setRecording(bool record);
80
86
92 bool saveRecord(std::string filename);
93
99 bool setReplaying(std::string &filename);
100
106
111 void pauseReplaying(bool pause);
112
118
123
124protected:
125 ZZServerCore *mCore;
126};
127
void(* ZZDNetServerClientInfoCallback)(std::string name, std::string socket, std::string info, void *usr)
服务器客户端信息回调函数定义
定义 ZZDNetServerDef.h:10
void(* ZZDNetServerLogCallback)(std::string log, void *usr)
服务器Log回调函数定义
定义 ZZDNetServerDef.h:6
void setRecording(bool record)
设置是否开始记录
~ZZDNetServer()
析构函数
bool isRecording()
是否正在记录
void pauseReplaying(bool pause)
设置是否停止回放
void stopService()
停止服务
bool tick()
更新
void removeClientInfoCallback(ZZDNetServerClientInfoCallback cb, void *usr)
删除客户端信息回调函数
bool startService(const char *lic)
开始服务
bool saveRecord(std::string filename)
保存记录到文件
void enableLog(bool enable, bool print)
启动日志
bool setReplaying(std::string &filename)
设置回放文件
void stopReplay()
停止回放
ZZDNetServer(const char *netName, const char *ip, int port, const char *mbip, int mbport)
构造函数
bool isReplaying()
是否正在回放
void addLogCallback(ZZDNetServerLogCallback cb, void *usr)
设置日志回调函数
void addClientInfoCallback(ZZDNetServerClientInfoCallback cb, void *usr)
设置客户端信息回调函数
bool isPauseReplaying()
是否正在回放
ZZServerCore * mCore
核心类
定义 ZZDNetServer.h:125