WSLAY_EVENT_SHUTDOWN_WRITE(3)

πŸ’… WSLAY_EVENT_SHUTDOWN_WRITE(3) πŸ’…

okay bestie, gather round, because we're talking about the wslay manual β€” yes, section 3, the library-functions girly β€” and specifically the icon that is wslay_event_shutdown_write. she's small, she's mighty, she's the "we're done here" button for your websocket's outgoing chatter. no cap. πŸŽ€


✨ NAME ✨

wslay_event_shutdown_write β€” Disable write operation 🚫✍️

like, she literally turns the writing off. that's the whole job. and she does it flawlessly, periodt.


🌸 SYNOPSIS 🌸

#include <wslay/wslay.h>

void wslay_event_shutdown_write(wslay_event_context_ptr ctx)

look at her. one include, one function, one argument, returns void because she has nothing to report back β€” she just does the thing. main character energy fr fr. πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

wslay_event_shutdown_write() stops the event-based API context from sending any further data to the peer. that's it. that's the tweet. 🐦

so the way it works: you hand her a ctx, and from that moment on, that event-based API context is done sending β€” no more data goes out to the peer. she doesn't negotiate, she doesn't ask twice, she just shuts the write side down. iconic. πŸ’…

ngl it's giving "we're closing the group chat, nobody text the peer again." and honestly? sometimes you need that. 😌

lowkey important: this is about not sending further data to the peer. it doesn't say anything else about what happens to the context β€” so don't go inventing extra behaviour in your head, bestie. the docs say what they say. 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

  • wslay_event_get_write_enabled() β€” the lil bestie you check in with when you wanna know if writing is still enabled. πŸ•΅οΈβ€β™€οΈ

🌈 AUTHOR 🌈

Tatsuhiro Tsujikawa β€” the legend, the moment, the actual author. bow down. πŸ™‡β€β™€οΈβœ¨


2024, 2015, Tatsuhiro Tsujikawa β€” that's the copyright notice, keep it cute, keep it credited. πŸ’œ


and that's the whole page, bestie!! 🌸 version @PACKAGE_VERSION@, dated Apr 22, 2024, straight from the wslay crew β€” WSLAY_EVENT_SHUTDOWN_WRITE(3) out. slay, bye!! πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from