This commit is contained in:
aixianling
2025-01-09 17:45:40 +08:00
commit 5c9f1dae4a
3482 changed files with 1146531 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
#ifndef _SRV_CONFIG_H_
#define _SRV_CONFIG_H_
//服务器端口地址等相关配置
typedef struct SrvConf
{
char szAddr[20];
int nPort;
char szServiceName[20];
} 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;
}DBCONF,*PDBCONF;
class CSrvConfig:
public CCustomLuaConfig
{
public:
/*
* 只读取同目录下的指定配置文件
*/
void ReadConfig(const char *pszFileName);
public:
CSrvConfig(void);
~CSrvConfig(void);
public:
SRVCONF SrvConf;
DBCONF DbConf;
int nSpid;
int nServerIndex;
protected:
void ShowError(const LPCTSTR sError);
};
#endif