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
2.3 KiB
65 lines
2.3 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: LgRemoteClientTcpIpBoardReceiver.cpp
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Source file of LgRemoteClientTcpIpBoardReceiver.cpp
|
|
//----------------------------------------------------------------------------
|
|
#include "stdafx.h"
|
|
#include "..\Version.h"
|
|
#include "LgRemoteClientTcpIpBoardReceiver.h"
|
|
|
|
CLgRemoteClientTcpIpBoardReceiver::CLgRemoteClientTcpIpBoardReceiver()
|
|
{
|
|
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteClientTcpIpBoardReceiver::CLgRemoteClientTcpIpBoardReceiver" );
|
|
}
|
|
|
|
CLgRemoteClientTcpIpBoardReceiver::~CLgRemoteClientTcpIpBoardReceiver()
|
|
{
|
|
Destroy();
|
|
|
|
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CLgRemoteClientTcpIpBoardReceiver::~CLgRemoteClientTcpIpBoardReceiver" );
|
|
}
|
|
|
|
BOOL CLgRemoteClientTcpIpBoardReceiver::Create( LPCTSTR lpszHostAddress, UINT nHostPort )
|
|
{
|
|
return CLgRemoteClientTcpIp::Create( lpszHostAddress, nHostPort, LG_REMOTE_E_SESSION_TYPE_BOARD_RECEIVER, LG_REMOTE_E_CONNECT_TYPE_MASTER );
|
|
}
|
|
|
|
void CLgRemoteClientTcpIpBoardReceiver::Destroy()
|
|
{
|
|
// unlink board receiver interface
|
|
CLgRemoteInterfaceBR::Unlink();
|
|
|
|
// destroy remote socket
|
|
CLgRemoteClientTcpIp::Destroy();
|
|
}
|
|
|
|
void CLgRemoteClientTcpIpBoardReceiver::OnPacketBoardReceiver( PLG_TCP_PACKET_BOARD_RECEIVER pReceivePacket )
|
|
{
|
|
switch( pReceivePacket->bSubType )
|
|
{
|
|
case LG_TCP_PACKET_BOARD_RECEIVER::BOARD_RECEIVER_TYPE_PROPERTIES:
|
|
DoRemoteBRGetChannelProperties();
|
|
break;
|
|
case LG_TCP_PACKET_BOARD_RECEIVER::BOARD_RECEIVER_TYPE_CONNECT:
|
|
DoRemoteBRChannelConnect( pReceivePacket->nConnectChannel );
|
|
break;
|
|
}
|
|
}
|
|
|
|
BOOL CLgRemoteClientTcpIpBoardReceiver::OnRemoteBRChannelConnect( INT nChannel, BOOL bResult )
|
|
{
|
|
return SendBoardReceiverConnect( GetConnectionID(), nChannel, bResult );
|
|
}
|
|
|
|
BOOL CLgRemoteClientTcpIpBoardReceiver::OnRemoteBRGetChannelProperties( INT nChannelCount, LG_TCP_PACKET_BOARD_RECEIVER::PCHANNEL_PROPERTIES pProperties )
|
|
{
|
|
return SendBoardReceiverProperties( GetConnectionID(), nChannelCount, pProperties );
|
|
}
|