Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
100 lines
2.5 KiB
C++
100 lines
2.5 KiB
C++
// BillingTestModule.h : PROJECT_NAME 응용 프로그램에 대한 주 헤더 파일입니다.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#ifndef __AFXWIN_H__
|
|
#error PCH에서 이 파일을 포함하기 전에 'stdafx.h'를 포함하십시오.
|
|
#endif
|
|
|
|
#include "resource.h" // 주 기호
|
|
#include "BillingAsyncSocket.h"
|
|
#include "HanUnitedBillingPacket.h"
|
|
|
|
#include <deque>
|
|
#include <list>
|
|
|
|
class CBillingTestModuleDlg;
|
|
|
|
// CBillingTestModuleApp:
|
|
// 이 클래스의 구현에 대해서는 BillingTestModule.cpp을 참조하십시오.
|
|
//
|
|
|
|
class CBillingTestModuleApp : public CWinApp
|
|
{
|
|
public:
|
|
CBillingTestModuleApp();
|
|
|
|
// 재정의
|
|
public:
|
|
virtual BOOL InitInstance();
|
|
|
|
// 구현
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
|
|
public:
|
|
|
|
enum
|
|
{
|
|
LISTEN_PORT = 10800
|
|
};
|
|
|
|
void ProcessPacket();
|
|
void AddRecvPacket(CBillingAsyncSocket& billingAsyncSocket,
|
|
const char* szBuffer, unsigned short usDataLen);
|
|
|
|
void SetMainDlg(CBillingTestModuleDlg& billingTestModule) { m_lpBillingTestModule = &billingTestModule; }
|
|
void ResetMainDlg(CBillingTestModuleDlg& billingTestModule)
|
|
{
|
|
if(m_lpBillingTestModule == &billingTestModule)
|
|
{
|
|
m_lpBillingTestModule = 0;
|
|
}
|
|
}
|
|
|
|
CBillingTestModuleDlg* GetMainDlg() { return m_lpBillingTestModule; }
|
|
|
|
size_t GetConnectedSocketNum() { return m_SocketList.size(); }
|
|
|
|
void RegisterSocket(CBillingAsyncSocket& billingAsyncSocket);
|
|
void RemoveSocket(CBillingAsyncSocket& billingAsyncSocket);
|
|
|
|
void SendPendingAll(const HanUnitedBilling::GLTransStruct& glTransStruct);
|
|
|
|
private:
|
|
|
|
bool ProcessLogin(CBillingAsyncSocket& billingAsyncSocket,
|
|
const HanUnitedBilling::GLTransStruct& glTransStruct);
|
|
|
|
bool ProcessLogout(CBillingAsyncSocket& billingAsyncSocket,
|
|
const HanUnitedBilling::GLTransStruct& glTransStruct);
|
|
|
|
bool ProcessBillAuth(CBillingAsyncSocket& billingAsyncSocket,
|
|
const HanUnitedBilling::GLTransStruct& glTransStruct);
|
|
|
|
struct Packet
|
|
{
|
|
CBillingAsyncSocket& m_billingAsyncSocket;
|
|
HanUnitedBilling::GLTransStruct m_glTransStruct;
|
|
|
|
unsigned long m_dwPendingTime;
|
|
unsigned long m_dwDelayMSec;
|
|
|
|
explicit Packet(CBillingAsyncSocket& billingAsyncSocket,
|
|
const HanUnitedBilling::GLTransStruct glTransStruct, unsigned long dwDelayMSec);
|
|
};
|
|
|
|
typedef std::deque<Packet> PacketList;
|
|
typedef std::list<CBillingAsyncSocket*> SocketList;
|
|
|
|
PacketList m_RecvPacketList;
|
|
SocketList m_SocketList;
|
|
|
|
CBillingAsyncSocket* m_lpListenAsyncSocket;
|
|
CBillingTestModuleDlg* m_lpBillingTestModule;
|
|
};
|
|
|
|
extern CBillingTestModuleApp theApp;
|