ROAR_STREAM_CONNECT_TO(3)
π roar_stream_connect_to(3) π
okay bestie, so this one lives in the System Manager's Manual: RoarAudio section of the manual pages, and it's literally the function that makes your stream go out and grab data from somewhere else. no cap.
β¨ NAME β¨
roar_stream_connect_to β Connects a stream to some listening socket π«Ά
πΈ SYNOPSIS πΈ
#include <roariaudio.h>
wait no hold on hold on. it's:
#include <roaraudio.h>
int roar_stream_connect_to(struct roar_connection * con, struct
roar_stream * s, int type, char * host, int port);
ok slay, that's the one. copy that exactly bestie, don't let me catch you typo-ing the include. π
π¦ DESCRIPTION π¦
So the way this works is: it lets the sound server connect out to some remote end to get its data for a stream. it's giving "hey server, go fetch". π
This is used internally to open additional streams for roar_simple_new_stream(3), so like, that's its main character energy origin story.
β οΈ NOTE: This is not an alternative version ofroar_stream_connect(3). Like, at all. You still need to connect the stream to the server viaroar_stream_connect(3)before you can use this call. fr fr, do it in that order or nothing works. π
π PARAMETERS π
conβ the connection to the server. your little link to home base. πsβ the stream to connect. the one we're sending off into the world.type,host,portβ where the stream should be connected to. like, the destination, the address, the whole vibe. for a full description of all these parameters, go peek atroar_socket_listen(3). iykyk. β¨
π NOTES π
Okay so this part is important and i need you to actually read it:
This call will block until the server process it's connecting to has accepted the connection. Yes, block. It just sits there. patient. waiting. π§
And because of that, this call is unusable to connect back to us if we are not threaded. Like, it will deadlock you, bestie, it's giving trap. π
For a nonblocking call, go see roar_stream_connect_to_ask(3) instead. that's the one you want in that situation, periodt.
β RETURN VALUE β
- On success these calls return
0. π₯³ - On error,
-1is returned. π
that's it, that's the whole contract. no in-between.
π EXAMPLES π
FIXME
yeah bestie they literally just wrote FIXME. iconic honestly. the docs said "figure it out yourself". πβ¨
π SEE ALSO π
and that's the whole page, bestie!! π this one came from RoarAudio, dated May 2011, and it's filed under roar_str...nnect_to(3) in the manual. go forth and connect some streams, you absolute legend. ππ¦β¨
π¦ 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