---
name: "roar_simple_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_simple_connect"
---

# roar\_simple\_connect(3)

Opens a connection to RoarAudio's sound server

## NAME

roar\_simple\_connect, roar\_simple\_connect2 - Opens a connection to RoarAudio's sound server

## SYNOPSIS

\#include \<roaraudio.h\>

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

## DESCRIPTION

This calls opens a connection to the RoarAudio's sound server. To disconnect use [**roar\_disconnect**(3)](/roar_disconnect/3.md).

## PARAMETERS

- **con**

  The roar\_connection object to be filled on success with all data needed for comunicating with the server. This is used by nearly all other functions.

- **server**

  The host or filename of the socket of the server. Should normally be **NULL** to try default locations.

- **name**

  The name of this client. Should be the name of the player without any paths or filenames.

- **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

FIXME

## SEE ALSO

[**roar\_disconnect**(3)](/roar_disconnect/3.md), [**libroar**(7)](/libroar/7.md), [**RoarAudio**(7)](/RoarAudio/7.md).
