WSLAY_EVENT_WANT_WRITE(3)

✨ WSLAY_EVENT_WANT_WRITE(3) ✨

ok so this one lives in the wslay section of the manual β€” section 3, library functions, you know the vibe πŸ’… β€” and it's called WSLAY_EVENT_WANT_WRITE(3). let's get into it bestie 🫢


🌸 NAME 🌸

wslay_event_want_write β€” the lil guy that tells you whether the library wants to send more data πŸ‘€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <wslay/wslay.h>

int wslay_event_want_write(wslay_event_context_ptr ctx)

πŸ’– DESCRIPTION πŸ’–

so wslay_event_want_write() is literally just there to let you know whether the library wants to send more data to the peer. that's it. that's the whole job. queen behavior honestly πŸ‘‘

and why do you care? because it's useful for deciding whether to wait for a write event in your I/O event notification functions β€” yes, we're talking about the classics: select(2) and poll(2). so before you go blocking on a write fd like it's gonna text you back, ask this function first πŸ’Œ


🌈 RETURN VALUE 🌈

  • returns 1 if the library wants to send more data to the peer πŸŽ‰
  • returns 0 if it doesn't πŸ™ˆ

πŸŽ€ SEE ALSO πŸŽ€

  • wslay_event_want_read()
  • wslay_event_shutdown_write()
  • wslay_event_get_write_enabled()

πŸ‘‘ AUTHOR πŸ‘‘

Tatsuhiro Tsujikawa β€” icon, legend, the moment πŸ’œ


2024, 2015, Tatsuhiro Tsujikawa


ok that's the whole page bestie, no cap 🧚

this was WSLAY_EVENT_WANT_WRITE(3) from the wslay manual, version @PACKAGE_VERSION@, dated Apr 22, 2024. stream it, love it, use it responsibly πŸ’–βœ¨
πŸ“¦ where this page comes from