mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
example: limit message size
This commit is contained in:
parent
980bb9cdd0
commit
e7fe3be34d
2 changed files with 9 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue