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

📄 cnserverclient.h

📁 这是一个远程控制程序
💻 H
字号:
//---------------------------------------------------------------------------
class CNServerClient;
typedef short CNServerClientId;

#ifndef CNServerClientH
#define CNServerClientH
//---------------------------------------------------------------------------
#include <list.h>

#include "CommandTable.h"
#include "CNServer.h"

typedef std::list<CNServerClientId> CNServerClientList;

class CNServerClient
{
public:
	// Constructor/destructor
	CNServerClient();
	~CNServerClient();

	// Allow the client thread to see inside the client object
	friend class CNServerClientThread;

	// Init
	virtual BOOL Init(CNServer *server,
			  VSocket *socket,
			  CNServerClientId newid);

	virtual CNServerClientId GetClientId() {return m_id;};
protected:
	CNServerClientId       	 m_id;

	CNServer		*m_server;
	// The socket
	VSocket			*m_socket;
	char			*m_client_name;

	// The client thread
	omni_thread		*m_thread;
};
class CNServerClientThread : public omni_thread
{
public:
	// Init
	virtual BOOL Init(CNServerClient *client,
		CNServer *server,
		VSocket *socket);

        virtual VInt32 AnalyzeParams(VString Buff,WORD BuffLen);     //分析参数串

	// The main thread function
	virtual void run(void *arg);    //主循环

protected:
	virtual ~CNServerClientThread();
	// Fields
protected:
        char                    ParamBuf[MAX_PARAM_COUNT][MAX_PARAM_LENGTH +1];
	VSocket                 *m_socket;
	CNServer                *m_server;
	CNServerClient          *m_client;
};

#endif

⌨️ 快捷键说明

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