增加ACE安全测试工程

This commit is contained in:
2025-12-06 16:42:21 +08:00
parent b78ee53326
commit b38ad590a9
68 changed files with 5385 additions and 0 deletions
+69
View File
@@ -0,0 +1,69 @@
#pragma once
#include <functional>
namespace Game
{
class NetbaraStatusReq;
class NetbarStatusRes;
};
class GameClient;
class TencentNetbarInterface
{
public:
TencentNetbarInterface();
~TencentNetbarInterface();
public:
enum RequestStatus
{
RS_NotRequest=0,
RS_ClientRequesting,
RS_ClientRequest_Done,
RS_ClientRequest_Failed,
RS_ServerRequesting,
RS_ReqestFailed,
RS_RequestDone,
};
enum NetbarStatus
{
NS_Unknown = 0,
NS_Netbar,
NS_ClientFailed,
NS_ServerFailed,
};
typedef std::function<void(RequestStatus)> RequestCallback;
bool beginRequestNetbarStatus(RequestCallback callback);
void onReceiveNetbarReportRequest(Game::NetbarStatusRes* response);
void init(GameClient* client);
void tick();
private:
static unsigned int _workingThreadEntry(void* param);
bool workThreadEntry();
private:
enum { TENCENT_NETBAR_DNF_CLIENT_GAME_ID = 20 };
private:
GameClient* m_client = nullptr;
std::atomic<RequestStatus> m_requestStatus;
HANDLE m_workThread;
NetbarStatus m_netbarStatus;
int32_t m_clientErrorCode;
int32_t m_serverErrorCode;
std::string m_serverErrorMessage;
int32_t m_netbarLevel;
RequestCallback m_requestCallback;
Game::NetbaraStatusReq* m_clientNetbarReq = nullptr;
};