roar_connect(3)

πŸ“¦ version 1.0~beta12, in ubuntu jammy

πŸ’– roar_connect(3) πŸ’–

okay bestie, so this one lives in the System Manager's Manual: RoarAudio section, and it's literally the door-opening move for talking to RoarAudio's sound server. it's giving "hello? let me in" energy. πŸšͺ✨


🌸 NAME 🌸

roar_connect, roar_connect2 β€” the functions that connect you to RoarAudio's sound server. that's it, that's the job. πŸ’…


✨ SYNOPSIS ✨

first, you gotta pull in the header, no cap:

#include <roaraudio.h>

then, the two icons themselves:

int roar_connect(struct roar_connection * con, char * server);
int roar_connect2 (struct roar_connection * con, char * server, int flags, uint_least32_t timeout);

yes bestie, they're basically twins, roar_connect2 just has ✨more options✨. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so what does this actually do? it connects you to RoarAudio's sound server. that's the whole vibe. 🌈

BUT. and this is important, so listen up: this call just connects to the sound server. no authentication, no identify, nothing. it's the raw, unglamorous handshake. 😭

do NOT use this from end user applications, bestie, i'm so serious. use roar_simple_connect(3) or roar_simple_connect2(3) instead. those are the ones that do the full glow-up for you. this one is for the low-level girlies only. πŸ’€

πŸŽ€ PARAMETERS πŸŽ€

  • con β€” the connection object, aka the little container that gets filled with all the data you need to actually talk to the server. and girl, nearly all other calls use this thing. it's the main character. πŸ‘‘
  • server β€” the server you're connecting to. the destination. the place. πŸ“
  • flags β€” flags for the connection. currently only ROAR_ENUM_FLAG_NONE and ROAR_ENUM_FLAG_NONBLOCK are supported. heads up though: ROAR_ENUM_FLAG_NONBLOCK disables some of the server location features, so it's a tradeoff, iykyk. ⭐
  • timeout β€” the timeout for the connection. a value of zero means no timeout. and here's the tea: currently timeouts are not supported at all. πŸ™ˆ

πŸ’œ RETURN VALUE πŸ’œ

  • on success, these calls return 0. slay. ✨
  • on error, -1 comes back. it's giving "nope." 😭

πŸ“ EXAMPLES πŸ“

want to see it in the wild? go peek at libroar/simple.c, and also check out roar_simple_connect(3). the receipts are right there, bestie. πŸ“–


🌟 SEE ALSO 🌟


and that's the whole page, periodt. this iconic little number is brought to you by RoarAudio, dated May 2011 β€” yes, she's been serving since 2011 and she's still here. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from