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.
61 lines
1.5 KiB
61 lines
1.5 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 10/11/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: LgGatewaySocketClient.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of LgGatewaySocketClient.h
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __LG__REPORT__SOCKET__CLIENT__H__INCLUDED__
|
|
#define __LG__REPORT__SOCKET__CLIENT__H__INCLUDED__
|
|
|
|
#include "..\Socket\LgSocketClient.h"
|
|
#include "LgReportSocket.h"
|
|
|
|
#pragma once
|
|
|
|
class CLgReportSocketClient :
|
|
public CLgSocketClient<CLgReportSocket>
|
|
{
|
|
public:
|
|
CLgReportSocketClient();
|
|
virtual ~CLgReportSocketClient();
|
|
|
|
public:
|
|
BOOL Create( INT nProvider, LPCTSTR pAddress, WORD wPort );
|
|
virtual void Destroy();
|
|
|
|
public:
|
|
BOOL& IsConnected() { return m_bConnected; }
|
|
|
|
private:
|
|
virtual void Dispatch( PLG_REPORT_PACKET pPacket );
|
|
|
|
private:
|
|
virtual void DispatchClientPacket( INT nProvider, PLG_REPORT_PACKET pPacket ) = 0;
|
|
virtual void DispatchClientConnect( INT nProvider, BOOL bConnected ) = 0;
|
|
|
|
protected:
|
|
virtual void OnConnect( int nErrorCode );
|
|
virtual void OnClose( int nErrorCode );
|
|
|
|
private:
|
|
INT m_nProvider;
|
|
|
|
private:
|
|
TCHAR m_pHostAddress[MAX_PATH];
|
|
UINT m_nHostPort;
|
|
|
|
private:
|
|
BOOL m_bConnected;
|
|
|
|
private:
|
|
BOOL m_bDestroying;
|
|
};
|
|
|
|
#endif
|