12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- //ClientTunnel.h
- ///////////////////////////////////////////////////////////////////////////////
- #ifndef _CLIENT_TUNNEL_H_
- #define _CLIENT_TUNNEL_H_
- #include "netMain.h"
- #include "protocolhdr.h"
- #include "struct_def.h"
- class CClientTunnel : public CTransportImpl
- {
- public:
- CClientTunnel();
- // static CClientTunnel *GetInstance()
- // {
- // if ( m_pInstance == NULL )
- // m_pInstance = new CClientTunnel;
- //
- // return m_pInstance;
- // }
- virtual ~CClientTunnel();
- public:
- int net_OpenSocket(
- IN ETransportType eType,
- IN unsigned short usPort,
- IN LPTRANSPORT_EVENT eventHandler,
- void *pContext);
- void net_CloseSocket();
- int net_Connect(IN unsigned long ulIPValue, IN unsigned short usPort);
- unsigned long net_Send(
- IN void *pHeader,
- IN void *pMessage,
- IN unsigned long ulDataLen);
- public:
- LPTRANSPORT_EVENT m_eventHandler;
- void *m_pContext;
- private:
- static CClientTunnel* m_pInstance;
- SOCKET m_hSocket;
- public:
-
- };
- #endif /*_CLIENT_TUNNEL_H_*/
|