You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
494 B
C++
23 lines
494 B
C++
|
|
#pragma once
|
|
|
|
|
|
#include "Module.h"
|
|
|
|
|
|
//网口Socket 通讯管理类
|
|
class CSocketMgr :public CModule
|
|
{
|
|
public:
|
|
CSocketMgr(void);
|
|
~CSocketMgr(void);
|
|
virtual void OnAppInitialize();
|
|
virtual MODULE GetModuleType(){return _SOCKET_PROP;};
|
|
bool Connect(const char* S_addr,u_short port);
|
|
void Close();
|
|
void Send(char* lpBuf,int nBufLen);
|
|
void Receive(char* lpBuf,int nBufLen);
|
|
public:
|
|
CSocket m_Socket;//Socket 管理对象
|
|
};
|
|
extern CSocketMgr *gSocketMgr; |