WSLAY_EVENT_CO...ET_NO_BUFFERING(3)
π WSLAY_EVENT_CONFIG_SET_NO_BUFFERING β wslay manual, section 3 π¦
okay bestie, sit down, hydrate, because we're talking about wslay_event_config_set_no_buffering() from the wslay library and it's literally the switch that decides whether your non-control frames get the whole-message-buffer treatment or not. no cap. π
β¨ NAME β¨
wslay_event_config_set_no_buffering β turn the buffering of an entire message on or off for non-control frames π
πΈ SYNOPSIS πΈ
#include <wslay/wslay.h>
void wslay_event_config_set_no_buffering(wslay_event_context_ptr ctx,
int val)
like, that's the whole vibe. you pass it your context pointer and an int and it does the thing. β¨
π DESCRIPTION π
so wslay_event_config_set_no_buffering() enables or disables buffering of an entire message for non-control frames. that's the job. that's the whole job. π
here's the tea on val:
- if
valis0β buffering is enabled π«Ά - otherwise (literally anything else) β buffering is disabled π
and now the part you actually need to remember: if wslay_event_on_msg_recv_callback gets invoked while buffering is disabled, the msg_length member of struct wslay_event_on_msg_recv_arg is set to 0. yes, zero. that's not a typo, that's the documented behaviour, periodt. β
control frames are ALWAYS buffered regardless of this function call. like, they don't care what you set. they're built different. no buffering opt-out for them, sorry bestie. π§
BIG ONE: this function must not be used after the first invocation of the wslay_event_recv() function. that's not a suggestion, that's a rule. call it early, call it once, call it before you start receiving. after that? it's giving forbidden. π
π SEE ALSO π
wslay_event_recv()
π AUTHOR π
Tatsuhiro Tsujikawa β the icon, the legend, the main character who wrote all this down for us. π«Ά
π COPYRIGHT π
2024, 2015, Tatsuhiro Tsujikawa
okay that's the whole page, you ate it, you understood it, we're obsessed. π this lil writeup came from the wslay manual, stamped with version @PACKAGE_VERSION@ and dated Apr 22, 20, and yes i'm telling you all of that at the very end like a little bow on top of the gift. bye bestie, go buffer responsibly πβ¨π¦
π¦ 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