ClientTunnel.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //ClientTunnel.h
  2. ///////////////////////////////////////////////////////////////////////////////
  3. #ifndef _CLIENT_TUNNEL_H_
  4. #define _CLIENT_TUNNEL_H_
  5. /*/////////////////////////////////////////////////////////////////////////* /
  6. #if defined(__cplusplus)
  7. extern "C" {
  8. #endif
  9. /*/////////////////////////////////////////////////////////////////////////*/
  10. #include "./include/netMain.h"
  11. #include "./include/protocolhdr.h"
  12. #include "./include/struct_def.h"
  13. /////////////////////////////////////////////////////////////////////////////
  14. class CClientTunnel : public CTransportImpl
  15. {
  16. public:
  17. CClientTunnel();
  18. virtual ~CClientTunnel();
  19. public:
  20. int net_OpenSocket(IN ETransportType eType,
  21. IN unsigned short usPort,
  22. IN LPTRANSPORT_EVENT eventHandler,
  23. void *pContext);
  24. void net_CloseSocket();
  25. int net_Connect(IN unsigned long ulIPValue, IN unsigned short usPort);
  26. unsigned long net_Send(IN void *pHeader,
  27. IN void *pMessage,
  28. IN unsigned long ulDataLen);
  29. public:
  30. LPTRANSPORT_EVENT m_eventHandler;
  31. void *m_pContext;
  32. private:
  33. SOCKET m_hSocket;
  34. };
  35. /*/////////////////////////////////////////////////////////////////////////* /
  36. #if defined(__cplusplus)
  37. }
  38. #endif
  39. /*/////////////////////////////////////////////////////////////////////////*/
  40. #endif /*_CLIENT_TUNNEL_H_*/