---
name: "roar_connect"
section: "3"
platform: "linux"
package: "libroar-dev"
version: "1.0~beta12-4"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/roar_connect"
---

# roar\_connect(3)

connects to RoarAudio's sound server

## NAME

roar\_connect, roar\_connect2 - connects to RoarAudio's sound server

## SYNOPSIS

\#include \<roaraudio.h\>

int roar\_connect(struct roar\_connection \* con, char \* server); int roar\_connect2     (struct roar\_connection \* con, char \* server, int flags, uint\_least32\_t timeout);

## DESCRIPTION

Connects to RoarAudio's sound server. This calls just connects to the sound server without any authentication or identify. Do not use this from end user applications. Use [**roar\_simple\_connect**(3)](/roar_simple_connect/3.md) or **roar\_simple\_connect2**(3).

## PARAMETERS

- **con**

  The connection object to be filled with the data needed to talk to the server used by nearly all other calls.

- **server**

  The server to connect to.

- **flags**

  Flags used to connect to the server. Currently only ROAR\_ENUM\_FLAG\_NONE and ROAR\_ENUM\_FLAG\_NONBLOCK are supported. ROAR\_ENUM\_FLAG\_NONBLOCK disables some of the server location features.

- **timeout**

  Timeout for the connection. A value of zero means no timeout. Currently timeouts are not supported.

## RETURN VALUE

On success these calls return 0.  On error, -1 is returned.

## EXAMPLES

See libroar/simple.c, [**roar\_simple\_connect**(3)](/roar_simple_connect/3.md).

## SEE ALSO

[**roar\_simple\_connect**(3)](/roar_simple_connect/3.md), [**libroar**(7)](/libroar/7.md), [**RoarAudio**(7)](/RoarAudio/7.md).
