Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::runtime::WebSocketOptions Struct Reference

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.

Detailed Description

Options for WebSocketChannel construction.

Member Data Documentation

◆ executor

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.

◆ max_message

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.

◆ max_payload

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.


The documentation for this struct was generated from the following file: