Merge tag 'v0.22.4'
release v0.22.4
This commit is contained in:
@@ -84,6 +84,12 @@ public:
|
||||
*/
|
||||
TagMask tag_mask = TagMask::All();
|
||||
|
||||
/**
|
||||
* The maximum number of bytes transmitted in a binary
|
||||
* response. Can be changed with the "binarylimit" command.
|
||||
*/
|
||||
size_t binary_limit = 8192;
|
||||
|
||||
private:
|
||||
static constexpr size_t MAX_SUBSCRIPTIONS = 16;
|
||||
|
||||
@@ -122,6 +128,7 @@ public:
|
||||
~Client() noexcept;
|
||||
|
||||
using FullyBufferedSocket::GetEventLoop;
|
||||
using FullyBufferedSocket::GetOutputMaxSize;
|
||||
|
||||
gcc_pure
|
||||
bool IsExpired() const noexcept {
|
||||
|
@@ -59,7 +59,7 @@ Response::Format(const char *fmt, ...) noexcept
|
||||
bool
|
||||
Response::WriteBinary(ConstBuffer<void> payload) noexcept
|
||||
{
|
||||
assert(payload.size <= MAX_BINARY_SIZE);
|
||||
assert(payload.size <= client.binary_limit);
|
||||
|
||||
return Format("binary: %zu\n", payload.size) &&
|
||||
Write(payload.data, payload.size) &&
|
||||
|
@@ -75,9 +75,9 @@ public:
|
||||
bool Write(const void *data, size_t length) noexcept;
|
||||
bool Write(const char *data) noexcept;
|
||||
bool FormatV(const char *fmt, std::va_list args) noexcept;
|
||||
bool Format(const char *fmt, ...) noexcept;
|
||||
|
||||
static constexpr size_t MAX_BINARY_SIZE = 8192;
|
||||
gcc_printf(2,3)
|
||||
bool Format(const char *fmt, ...) noexcept;
|
||||
|
||||
/**
|
||||
* Write a binary chunk; this writes the "binary" line, the
|
||||
|
Reference in New Issue
Block a user