mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 10:19:51 +00:00
example: limit message size
This commit is contained in:
parent
c0baf9b873
commit
9b4b49a6a8
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