client/Response: add constant MAX_BINARY_SIZE
Use the same chunk size for all binary commands.
This commit is contained in:
@@ -59,6 +59,8 @@ Response::Format(const char *fmt, ...) noexcept
|
||||
bool
|
||||
Response::WriteBinary(ConstBuffer<void> payload) noexcept
|
||||
{
|
||||
assert(payload.size <= MAX_BINARY_SIZE);
|
||||
|
||||
return Format("binary: %zu\n", payload.size) &&
|
||||
Write(payload.data, payload.size) &&
|
||||
Write("\n");
|
||||
|
||||
Reference in New Issue
Block a user