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

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 09/11/2003
// PROJECT:
// SUBSYSTEM:
// FILE: LgGatewaySocketServerConnection.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of LgGatewaySocketServerConnection.cpp
//----------------------------------------------------------------------------
#include "stdafx.h"
#include "LgReportSocketServerConnection.h"
#include "LgReportSocketServer.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
CLgReportSocketServerConnection::CLgReportSocketServerConnection( CLgReportSocketServer *pServer ) :
CLgSocketServerConnection<CLgReportSocket>( pServer )
{
memset( &m_SockAddr, 0, sizeof(m_SockAddr) );
}
CLgReportSocketServerConnection::~CLgReportSocketServerConnection()
{
}
void CLgReportSocketServerConnection::Dispatch( PLG_REPORT_PACKET pPacket )
{
static_cast<CLgReportSocketServer*>(GetServer())->DispatchServerPacket( this, pPacket );
}
void CLgReportSocketServerConnection::OnConnect( LPSOCKADDR_IN pSockAddr )
{
m_SockAddr = *pSockAddr;
static_cast<CLgReportSocketServer*>(GetServer())->DispatchServerConnect( this, TRUE, pSockAddr );
CLgSocketServerConnection<CLgReportSocket>::OnConnect( pSockAddr );
}
void CLgReportSocketServerConnection::OnClose( int nErrorCode )
{
static_cast<CLgReportSocketServer*>(GetServer())->DispatchServerConnect( this, FALSE, &m_SockAddr );
}