Here's how we can set the maximum permitted size for received WebSocket frames, in bytes.

pub fn max_frame_size(self, max_size: usize) -> Self Sets the maximum permitted size for received WebSocket frames, in bytes. By default, up to 64KiB is allowed. Here's an example from real world application yaps.chat. : yaps.chat - one-time end-to-end encrypted anonymous chats. Example: File: handler.rs Then replace all the Message to AggregatedMessage Documentation:

Mar 8, 2025 - 17:50
 0
Here's how we can set the maximum permitted size for received WebSocket frames, in bytes.

pub fn max_frame_size(self, max_size: usize) -> Self

Sets the maximum permitted size for received WebSocket frames, in bytes.

By default, up to 64KiB is allowed.

Here's an example from real world application yaps.chat.
: yaps.chat - one-time end-to-end encrypted anonymous chats.

Example:
File: handler.rs

Setting up custom maximum size

Then replace all the Message to AggregatedMessage

AggregatedMessage

Documentation: