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. 🫢


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