example: limit message size

This commit is contained in:
frsyuki (none)
2009-02-26 01:33:34 +09:00
parent c0baf9b873
commit 9b4b49a6a8
2 changed files with 9 additions and 0 deletions

View File

@@ -43,6 +43,10 @@ public:
process_message(msg, life);
}
if(m_pac.message_size() > 10*1024*1024) {
throw std::runtime_error("message is too large");
}
}
private: