Skip to content
Snippets Groups Projects
Commit 388d43b8 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

reduce maximum value size to 56 KB

A larger maximum size was supported by the protocol but
not the underlying transport (UDP).
parent 6b83077a
Branches
Tags
No related merge requests found
...@@ -80,7 +80,7 @@ using StorePolicy = std::function<bool(InfoHash key, std::shared_ptr<Value>& val ...@@ -80,7 +80,7 @@ using StorePolicy = std::function<bool(InfoHash key, std::shared_ptr<Value>& val
*/ */
using EditPolicy = std::function<bool(InfoHash key, const std::shared_ptr<Value>& old_val, std::shared_ptr<Value>& new_val, InfoHash from, const sockaddr* from_addr, socklen_t from_len)>; using EditPolicy = std::function<bool(InfoHash key, const std::shared_ptr<Value>& old_val, std::shared_ptr<Value>& new_val, InfoHash from, const sockaddr* from_addr, socklen_t from_len)>;
static constexpr const size_t MAX_VALUE_SIZE {1024 * 128}; static constexpr const size_t MAX_VALUE_SIZE {1024 * 56};
struct ValueType { struct ValueType {
typedef uint16_t Id; typedef uint16_t Id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment