ROAR_SOCKET_NONBLOCK(3)
π roar_socket_nonblock β it's in section 3 of the System Manager's Manual, bestie, and it's giving RoarAudio π
okay so picture this: you've got a socket, right? and it's just sitting there being all blocking and dramatic, and you're like "girl, I do not have time to wait for you." That's literally this function. roar_socket_nonblock flips the blocking state of a socket and it's so simple it's honestly iconic. β¨
πΈ SYNOPSIS πΈ
#include <roaraudio.h>
int roar_socket_nonblock(int fh, int state);
two args, one int back, no drama. we love a low-maintenance queen. π
π¦ DESCRIPTION π¦
So what does it actually do? It sets the blocking mode of a given filehandle. That's it, that's the whole vibe. π«Ά
If you're sitting there like "bestie what even IS nonblocking IO," no worries, the original author said it best: go read open(2) and look for O_NONBLOCK. That's the lore. πβ¨
π PARAMETERS π
fhβ the filehandle you're setting the new state on. hand it over, she's getting a glow-up. πstateβ the new state you want, and you've got exactly two moods to pick from:ROAR_SOCKET_BLOCKβ sets blocking mode. back to the old ways, she waits. π΄ROAR_SOCKET_NONBLOCKβ sets nonblocking mode. main character energy, no waiting around. π₯- and just so we're clear,
ROAR_SOCKET_NONBLOCKis the same as settingO_NONBLOCKwithinopen(2). same energy, different spelling. iykyk. π
π RETURN VALUE π
- on success β these calls return
0. slay. β¨ - on error β
-1is returned. not slay. π
fr fr, always check that return value. -1 is the group chat notification you do NOT want to ignore. π
π EXAMPLES π
FIXME
yeah bestie the examples section literally just says FIXME π the maintainers left us on read. not me being obsessed with a TODO though. π
π SEE ALSO π
go read these, they're the supporting cast and they ate. π πΈ
RoarAudio β¨ May 2011 β that's the source, the version, and the date, and yes we're closing this out like a signature on a love letter. mwah. πππ¦π§β
π¦ where this page comes from
- ubuntu jammy: libroar-dev 1.0~beta12-4 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms