c++企业级接口框架(一)
SocketProtocol.h
#ifndef _SOCKET_PROTOCOL_H_
#define _SOCKET_PROTOCOL_H_
#include <stdint.h>
/**
说明:接口*/
class SocketProtocol {
public:
virtual bool cltSocketInit () = 0;
virtual bool cltSocketSend (const uint8_t *BufIn, unsigned int iBuflenIn) = 0;
virtual bool cltSocketRecv (uint8_t *BufOut, unsigned int *iBuflenOut) = 0;
virtual bool cltSocketDestory () = 0;
};
#endif
SocketImp.h
class SocketImp_1 :public SocketProtocol {
uint8_t *m_pBuffer;
unsigned int m_iLen;
public:
SocketImp_1 ();
~SocketImp_1 ();
bool cltSocketInit ();
bool cltSocketSend (const uint8_t *BufIn, unsigned int iBuflenIn);
bool cltSocketRecv (uint8_t *BufOut, unsigned int *iBuflenOut);
bool cltSock