Feature: add client log dialog with auto-refresh, icon and menu bitmap
- 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>
This commit is contained in:
21
client/ClientLogManager.h
Normal file
21
client/ClientLogManager.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#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;
|
||||
};
|
||||
Reference in New Issue
Block a user