⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 svrlist.h

📁 跨操作系统的微型中间件
💻 H
字号:

#ifndef _SVRLIST_H_
#define _SVRLIST_H_

#ifdef __Win32__
#pragma warning(disable:4786)
#endif


#include <vector>
#include "OSMutex.h"
#include "OSHeaders.h"


using  namespace	std;

class CSvrList;

extern CSvrList * g_svrList;

typedef struct  {
	char	strIP[20];
	UInt16  port;
}	svrListElem ;

class CSvrList
{
public:	
	
	static CSvrList*	GetInstance();
	static void			DelInstance();

	static UInt16		SetSvrList(char ** svr, UInt16 len);
	static Bool			AddSvr(char* svr, UInt16 port);
//	static UInt32		GetOneSvrAddrI( int readAtList);
	static char*		GetOneSvrAddrS( int readAtList);
	static UInt16		GetPort(int readAtList);
	static UInt16		GetSize() {return m_svrList.size();}
private:
	CSvrList();
	~CSvrList();
	static CSvrList*			m_pSvrList;	
	static vector<svrListElem>	m_svrList;	
	static OSMutex				m_svrListMutex;	
};

#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -