wslay_event_config_set_max_recv_msg_length(3)

wslay_event_config_set_max_recv_msg_length3

Set maximum length of a message that can be received

Usage

#include <wslay/wslay.h>

void wslay_event_config_set_max_recv_msg_length(wslay_event_context_ptr ctx, uint64_t val)

Overview

wslay_event_config_set_max_recv_msg_length() sets maximum length of a message that can be received. The length of message is checked by wslay_event_recv() function. If the length of a message is larger than this value, reading operation is disabled (same effect with wslay_event_shutdown_read() call) and close control frame with WSLAY_CODE_MESSAGE_TOO_BIG is queued. If buffering for non-control frames is disabled, the library checks each frame payload length and does not check length of entire message.

The default value is (1u << 31)-1.

Releases

5 releases since Debian 10 (Buster); the text changed 4 times.

  1. 10
  2. 11
  3. 12
  4. 13
  5. Arch

Author

Tatsuhiro Tsujikawa

From libwslay 1.1.1-7 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.