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.

51 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: LgGatewaySocketServerConnection.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of LgGatewaySocketServerConnection.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "LgReportSocketServerConnection.h"
  16. #include "LgReportSocketServer.h"
  17. #ifdef _DEBUG
  18. #undef THIS_FILE
  19. static char THIS_FILE[]=__FILE__;
  20. #define new DEBUG_NEW
  21. #endif
  22. CLgReportSocketServerConnection::CLgReportSocketServerConnection( CLgReportSocketServer *pServer ) :
  23. CLgSocketServerConnection<CLgReportSocket>( pServer )
  24. {
  25. memset( &m_SockAddr, 0, sizeof(m_SockAddr) );
  26. }
  27. CLgReportSocketServerConnection::~CLgReportSocketServerConnection()
  28. {
  29. }
  30. void CLgReportSocketServerConnection::Dispatch( PLG_REPORT_PACKET pPacket )
  31. {
  32. static_cast<CLgReportSocketServer*>(GetServer())->DispatchServerPacket( this, pPacket );
  33. }
  34. void CLgReportSocketServerConnection::OnConnect( LPSOCKADDR_IN pSockAddr )
  35. {
  36. m_SockAddr = *pSockAddr;
  37. static_cast<CLgReportSocketServer*>(GetServer())->DispatchServerConnect( this, TRUE, pSockAddr );
  38. CLgSocketServerConnection<CLgReportSocket>::OnConnect( pSockAddr );
  39. }
  40. void CLgReportSocketServerConnection::OnClose( int nErrorCode )
  41. {
  42. static_cast<CLgReportSocketServer*>(GetServer())->DispatchServerConnect( this, FALSE, &m_SockAddr );
  43. }