WSLAY_EVENT_SHUTDOWN_READ(3)
π WSLAY_EVENT_SHUTDOWN_READ π
okay bestie, welcome to the wslay manual, section 3 (yes that's the library-calls section, iykyk). today's episode: wslay_event_shutdown_read, and it's literally the "girl, stop reading" button. π
β¨ NAME β¨
wslay_event_shutdown_read β disable read operation π
πΈ SYNOPSIS πΈ
#include <wslay/wslay.h>
void wslay_event_shutdown_read(wslay_event_context_ptr ctx)
π¦ DESCRIPTION π¦
wslay_event_shutdown_read() makes the event-based API context stop reading any more data from the peer. that's it. that's the whole job. no more incoming bytes for this context, periodt. π
the way that this is a one-way ticket β you're telling the context "we're done listening", not "pause for a sec".
here's where it gets spicy πΆοΈ: this function may be used together with wslay_event_queue_close() β perfect combo when your application spots an error in the data it already received and wants to fail the WebSocket connection. caught a bad vibe in the payload? shutdown the read side, queue the close, and let it go. πβ¨
π SEE ALSO π
wslay_event_get_read_enabled()β the little "are we still reading tho?" check-in π
π AUTHOR π
Tatsuhiro Tsujikawa β the icon, the legend, the main character who wrote this. π«Ά
π COPYRIGHT π
2024, 2015, Tatsuhiro Tsujikawa
and that's a wrap on the wslay page for WSLAY_EVENT_SHUTDOWN_READ(3)! π this version is @PACKAGE_VERSION@, dated Apr 22, 2024, and honestly? she ate. go forth and shut down those reads responsibly, bestie πΈπ¦β
π¦ 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