Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.6 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 09/11/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: LgGatewaySocket.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of LgGatewaySocket.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __LG__GATEWAY__SOCKET__H__INCLUDED__
  15. #define __LG__GATEWAY__SOCKET__H__INCLUDED__
  16. #include "..\Socket\LgSocket.h"
  17. #include "..\LgImageJPEG.h"
  18. #pragma once
  19. typedef struct LG_REPORT_PACKET
  20. {
  21. INT nLength;
  22. BYTE bType;
  23. }LG_REPORT_PACKET, *PLG_REPORT_PACKET;
  24. class CLgReportSocket :
  25. public CLgSocket
  26. {
  27. public:
  28. CLgReportSocket();
  29. virtual ~CLgReportSocket();
  30. public:
  31. virtual int Send( const void* lpBuf, int nBufLen, int nFlags = 0 );
  32. int Send2( const void* lpBuf1, int nBufLen1, const void* lpBuf2, int nBufLen2 );
  33. public:
  34. BOOL GetTransferInfo( PLARGE_INTEGER pTX, PLARGE_INTEGER pRX );
  35. protected:
  36. virtual void OnReceive( int nErrorCode );
  37. virtual void OnSend( int nErrorCode );
  38. virtual void OnClose( int nErrorCode );
  39. private:
  40. virtual void Dispatch( PLG_REPORT_PACKET pPacket );
  41. protected:
  42. virtual void OnPacket( PLG_REPORT_PACKET pReceivePacket ) {}
  43. private:
  44. PBYTE m_pBuffer;
  45. INT m_nCount;
  46. private:
  47. CLgProtectedFastStream<BYTE,20> m_OutputStream;
  48. private:
  49. LARGE_INTEGER m_liTransferTX;
  50. LARGE_INTEGER m_liTransferRX;
  51. };
  52. #endif