- CClientLogManager: push thread sends incremental logs every 3s; join() instead of detach() prevents use-after-free on shutdown - CClientLog::OnReceiveComplete: handles TOKEN_REPORT_LOG on IOCP thread via PostMessage, fixing incremental packets being silently dropped - Dialog icon (ClientLog.ico) and menu bitmap (ClientLog.bmp) added; OnInitDialog loads icon; IDR_MENU_LIST_ONLINE "运行日志" item gets the bitmap Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
484 B
C++
22 lines
484 B
C++
#pragma once
|
|
#include "Manager.h"
|
|
#include <atomic>
|
|
#include <mutex>
|
|
#include <thread>
|
|
|
|
class CClientLogManager : public CManager
|
|
{
|
|
public:
|
|
CClientLogManager(IOCPClient* ClientObject, int n = 0, void* p = nullptr);
|
|
~CClientLogManager();
|
|
virtual VOID OnReceive(PBYTE szBuffer, ULONG ulLength);
|
|
|
|
private:
|
|
void SendLogDump();
|
|
|
|
size_t m_sentIdx;
|
|
std::mutex m_sendMutex;
|
|
std::atomic<bool> m_running;
|
|
std::thread m_pushThread;
|
|
};
|