mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-16 18:56:54 +02:00
example: limit message size
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user