Files
mir_server/server/LoggerServer/SrvConfig.h
aixianling 5c9f1dae4a init
2025-01-09 17:45:40 +08:00

45 lines
749 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _SRV_CONFIG_H_
#define _SRV_CONFIG_H_
//服务器端口地址等相关配置
typedef struct SrvConf
{
char szAddr[20];
int nPort;
char szServiceName[128];
} SRVCONF,*PSRVCONF;
typedef struct DbConf{
char szHost[100];
int nPort;
char szDbName[100];
char szUser[100];
char szPassWord[100];
char szKey[100];//用于解密的key16位
bool m_bUtf8; //是否使用utf8编码
}DBCONF,*PDBCONF;
class CSrvConfig:
public CCustomLuaConfig
{
public:
/*
* 只读取同目录下的指定配置文件
*/
void ReadConfig(const char *pszFileName);
public:
CSrvConfig(void);
~CSrvConfig(void);
public:
SRVCONF SrvConf;
DBCONF DbConf;
SRVCONF ChatConf;
protected:
void ShowError(const LPCTSTR sError);
};
#endif