muroar_close(3)

πŸ“¦ version 0.1.13, in ubuntu jammy

πŸ’– muroar_close(3) β€” the muRoar Programmer's Manual, bestie edition πŸŽ€

okay so you're here for muroar_close, and honestly? iconic of you. this is the little function from the muRoar Programmer's Manual that hangs up on the RoarAudio sound server politely instead of just ghosting it. πŸ’…


✨ NAME ✨

muroar_close β€” disconnect a stream from the RoarAudio sound server πŸ¦‹


✨ SYNOPSIS ✨

#include <muroar.h>

int muroar_close(muroar_t fh);

✨ DESCRIPTION ✨

so basically this function disconnects a data connection (a stream, bestie) from the sound server, and it does it in a clean way. no drama, no messy exit, just a graceful lil goodbye. 🌸

the socket is closed by this function. that's the whole point. you do NOT need an extra close(2) on top of it β€” the way that would be doing the most for absolutely no reason 😭

⚠️ ok but this part is important, like actually important: open control connections that were not created by muroar_stream(3) must NOT be closed using this function. nope. not allowed. they must be closed using muroar_quit(3) instead. use the right function for the right connection or it's giving chaos, fr fr πŸ’€

✨ RETURN VALUE ✨

  • on success this call returns 0 β€” slay ✨
  • on error, -1 is returned β€” not slay 😭

✨ HISTORY ✨

this function first appeared in muRoar version 0.1beta0. so it's been here since basically day one. a true original. a founding mother. πŸ‘‘


✨ SEE ALSO ✨


and that's the whole page, bestie β€” go forth and close your streams correctly 🫢

this was muRoar, from April 2012, muRoar era forever πŸ’œ lowkey a classic, highkey timeless. mwah. πŸ’–βœ¨

πŸ“¦ where this page comes from