ClientTunnel.h 877 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //ClientTunnel.h
  2. ///////////////////////////////////////////////////////////////////////////////
  3. #ifndef _CLIENT_TUNNEL_H_
  4. #define _CLIENT_TUNNEL_H_
  5. #include "..\NetWork\data_def.h"
  6. class CClientTunnel
  7. {
  8. public:
  9. CClientTunnel();
  10. virtual ~CClientTunnel();
  11. public:
  12. static TransportStatus Transport_Init();
  13. static TransportStatus Transport_UnInit();
  14. int net_OpenSocket(
  15. IN CONST ETransportType eType,
  16. IN CONST unsigned short usPort,
  17. IN LPTRANSPORT_EVENT eventHandler,
  18. void *pContext);
  19. void net_CloseSocket();
  20. int net_Connect(IN CONST unsigned long ulIPValue, IN CONST unsigned short usPort);
  21. unsigned long net_Send(
  22. IN void *pHeader,
  23. IN void *pMessage,
  24. IN CONST unsigned long ulDataLen);
  25. public:
  26. LPTRANSPORT_EVENT m_eventHandler;
  27. void *m_pContext;
  28. private:
  29. INT m_nIndex;
  30. };
  31. #endif /*_CLIENT_TUNNEL_H_*/