WSLAY_EVENT_CON...RECV_MSG_LENGTH(3)
π WSLAY_EVENT_CONFIG_SET_MAX_RECV_MSG_LENGTH π
okay bestie, come sit with me, we're reading a wslay (section 3) page and it's literally about one little function: wslay_event_config_set_max_recv_msg_length β aka "how big is too big for a message around here". πΈ
β¨ NAME β¨
wslay_event_config_set_max_recv_msg_length β set the maximum length of a message that can be received π«Ά
β¨ SYNOPSIS β¨
#include <wslay/wslay.h>
void wslay_event_config_set_max_recv_msg_length(wslay_event_context_ptr
ctx, uint64_t val)
like, that's it. that's the whole signature. no return value, she's a void girlie π
β¨ DESCRIPTION β¨
so wslay_event_config_set_max_recv_msg_length() sets the maximum length of a message that can be received. the vibe check on that length happens inside the wslay_event_recv() function β that's the bouncer at the door. πͺ
and if a message is larger than this value? bestie. the reading operation gets disabled (same effect you'd get from calling wslay_event_shutdown_read()), and a close control frame with WSLAY_CODE_MESSAGE_TOO_BIG gets queued. not me being dramatic, that's literally what happens. π
one lil' nuance, and it's important so don't skip it: if buffering for non-control frames is disabled, then the library checks each frame payload length and does not check the length of the entire message. so the check is per-frame in that mode, not per-message. π¦
the default value is (1u << 31)-1. iconic. generous. giving main character energy with the headroom. β¨
β¨ SEE ALSO β¨
wslay_event_recv()wslay_event_shutdown_read()
β¨ AUTHOR β¨
Tatsuhiro Tsujikawa π
β¨ COPYRIGHT β¨
2024, 2015, Tatsuhiro Tsujikawa
and that's the whole page, bestie!! this lil' beauty comes from wslay, version @PACKAGE_VERSION@, dated Apr 22 β go forth and configure your message limits responsibly, no cap. ππ¦π
π¦ where this page comes from
- ubuntu noble: libwslay-doc 1.1.1-4build1 Β· MIT
- ubuntu questing: libwslay-doc 1.1.1-4build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms