flow:流量限定初步调试完成。

This commit is contained in:
2025-11-09 11:53:59 +08:00
parent 089d542a8d
commit 0ac77752c9
7 changed files with 125 additions and 7 deletions

View File

@@ -42,8 +42,13 @@ private:
void replyRequest(QSharedPointer<ClientInfo> client, QSharedPointer<FrameBuffer> frame);
bool sendData(QTcpSocket* socket, QSharedPointer<FrameBuffer> frame);
// 流量控制
bool sendWithFlowCheck(QTcpSocket* fsoc, QTcpSocket* tsoc, QSharedPointer<FrameBuffer> frame);
BlockLevel getBlockLevel(QTcpSocket* socket);
QString id_;
QMap<QString, QSharedPointer<ClientInfo>> clients_;
QMap<QString, int> flowBackCount_;
QReadWriteLock rwLock_;
QTimer* monitorTimer_;
};