ser:服务端接收大量无效数据时踢出客户端。

This commit is contained in:
2025-11-15 17:26:09 +08:00
parent de792bb68f
commit 7a69db774d
3 changed files with 13 additions and 5 deletions

View File

@@ -13,6 +13,8 @@ constexpr quint32 CHUNK_BUF_SIZE = 1 * 1024 * 512;
constexpr quint32 FLOW_BACK_MULTIPLE = 50;
// 阻塞等级放大倍率
constexpr quint32 BLOCK_LEVEL_MULTIPLE = 5;
// 允许最大的无效数据包大小
constexpr quint32 MAX_INVALID_PACKET_SIZE = CHUNK_BUF_SIZE * 5;
// It is specified here that the first 30 contents (inclusive) are
// used for communication with the server.