添加配置文件热加载功能

This commit is contained in:
xiongziliang
2018-02-09 11:42:55 +08:00
parent 551b9a437b
commit 70bb1a652a
16 changed files with 217 additions and 139 deletions

View File

@@ -47,8 +47,8 @@ ShellSession::~ShellSession() {
void ShellSession::onRecv(const Socket::Buffer::Ptr&buf) {
//DebugL << hexdump(buf->data(), buf->size());
static uint32_t maxReqSize = mINI::Instance()[Config::Shell::kMaxReqSize].as<uint32_t>();
if (m_strRecvBuf.size() + buf->size() >= maxReqSize) {
GET_CONFIG_AND_REGISTER(uint32_t,maxReqSize,Config::Shell::kMaxReqSize);
if (m_strRecvBuf.size() + buf->size() >= maxReqSize) {
WarnL << "接收缓冲区溢出!";
shutdown();
return;