WSLAY_EVENT_GET_CLOSE_SENT(3)

✨ WSLAY_EVENT_GET_CLOSE_SENT(3) ✨

okay bestie, welcome to the wslay section 3 manual, and today's main character is a tiny little query function that tells you if you've already said bye πŸ‘‹


πŸ’– NAME πŸ’–

wslay_event_get_close_sent β€” the vibe check that answers: has a close control frame been sent to the peer yet?? πŸ¦‹


🌸 SYNOPSIS 🌸

#include <wslay/wslay.h>

int wslay_event_get_close_sent(wslay_event_context_ptr ctx)

like yes, that's the whole thing. short. iconic. no notes. πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

okay so here's the tea β˜• β€” wslay_event_get_close_sent() looks at your ctx and tells you one very specific thing:

  • it returns 1 if a close control frame has been sent to the peer βœ…
  • or it returns 0 if it hasn't ❌

that's it. that's the whole function. it does not do anything else, it does not pass go, it does not collect $200. it just tells you whether the goodbye has left the building πŸšͺπŸ’¨

ngl for a one-liner of a return value she really ate. obsessed. πŸ’–


πŸ‘€ SEE ALSO πŸ‘€

  • wslay_event_get_close_sent()

(not me noticing the SEE ALSO is just... the same function. she's her own reference. main character energy fr fr πŸ‘‘βœ¨)


🫢 AUTHOR 🫢

Tatsuhiro Tsujikawa β€” the legend who wrote all of this, give them their flowers πŸ’


2024, 2015, Tatsuhiro Tsujikawa


reminder bestie: ctx is a wslay_event_context_ptr, so keep it valid β€” this function is a simple query and doesn't return a fancy error code, just the 1 or the 0 πŸ’œ

and that's a wrap!! πŸŽ€ this was page @PACKAGE_VERSION@, dated Apr 22, 2024, straight out of the wslay manual, section 3 β€” bye pookie, go forth and check your close frames πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from