25 ZZDNetServer(
const char *netName,
const char *ip,
int port,
const char *mbip,
int mbport);
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)
设置是否开始记录
void pauseReplaying(bool pause)
设置是否停止回放
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)
设置回放文件
ZZDNetServer(const char *netName, const char *ip, int port, const char *mbip, int mbport)
构造函数
void addLogCallback(ZZDNetServerLogCallback cb, void *usr)
设置日志回调函数
void addClientInfoCallback(ZZDNetServerClientInfoCallback cb, void *usr)
设置客户端信息回调函数
bool isPauseReplaying()
是否正在回放
ZZServerCore * mCore
核心类
定义 ZZDNetServer.h:125