Options for WebSocketChannel construction. More...
#include <websocket_channel.hpp>
Public Attributes | |
| MessageExecutor | executor |
| Executor used to dispatch on_message, on_closed, on_error. | |
| std::size_t | max_payload = 16u * 1024u * 1024u |
| Maximum inbound payload size (bytes). | |
| std::size_t | max_message = 64u * 1024u * 1024u |
| Maximum total size (bytes) of a message reassembled across continuation frames. | |
Options for WebSocketChannel construction.
| MessageExecutor pulp::runtime::WebSocketOptions::executor |
Executor used to dispatch on_message, on_closed, on_error.
When empty, callbacks run on the reader thread. Do not destroy the channel from an inline callback; call close() and defer destruction, or provide an executor that owns callback lifetime.
| std::size_t pulp::runtime::WebSocketOptions::max_message = 64u * 1024u * 1024u |
Maximum total size (bytes) of a message reassembled across continuation frames.
max_payload bounds a single frame; without a separate total cap a peer streaming endless non-final fragments would grow the reassembly buffer without limit (memory-exhaustion DoS). Exceeding this triggers an error + close. Default 64 MiB.
| std::size_t pulp::runtime::WebSocketOptions::max_payload = 16u * 1024u * 1024u |
Maximum inbound payload size (bytes).
Frames larger than this trigger an error + close. Default 16 MiB — enough for normal control traffic while bounding pathological peers.