WSLAY_EVENT_WANT_READ(3)
π WSLAY_EVENT_WANT_READ(3) π
okay bestie, welcome to the wslay manual, section 3 π¦ β this is the one about wslay_event_want_read and honestly? it's short and sweet and we're gonna slay it β¨
πΈ NAME πΈ
wslay_event_want_read β the lil function that tells you whether the library wants to read more data π
π SYNOPSIS π
#include <wslay/wslay.h>
int wslay_event_want_read(wslay_event_context_ptr ctx)
yes that's the whole thing. one include, one call, one int. we love a minimal icon π
β¨ DESCRIPTION β¨
so like, wslay_event_want_read() exists purely to answer one question for you: does the library want to read more data from the peer or not? that's it, that's the whole job π«Ά
and why do you care?? because this is the vibe-check you need when you're deciding whether to sit around waiting for a read event in your I/O event notification functions β think select(2) and poll(2), the classics π. you don't wanna just block forever on a read that nobody asked for, so you ask this function first and it tells you what's up. main character energy fr fr π
π RETURN VALUE π
- returns
1if the library wants to read more data from the peer - returns
0if it does not
that's the entire range. no weird negative numbers, no surprises. iconic behavior honestly πβ¨
π SEE ALSO π
go give these besties a visit too, they're all in the same friend group:
wslay_event_want_write()wslay_event_shutdown_read()wslay_event_get_read_enabled()
iykyk π§
π AUTHOR π
Tatsuhiro Tsujikawa β the actual legend behind all of this π«‘
π COPYRIGHT π
2024, 2015, Tatsuhiro Tsujikawa
lowkey a whole bop of a manpage: one function, one question, one int. periodt π
πΈ
and that's a wrap on this page, bestie β this was wslay @PACKAGE_VERSION@, dated Apr 22, 2024, filing itself neatly under WSLAY_EVENT_WANT_READ(3). drink some water, go read your sockets responsibly, mwah ππ
π¦ 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