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

# roar\_terminate(3)

let RoarAudio's sound server quit roar\_terminate - let RoarAudio's sound server quit as soon as all clients quit

## NAME

roar\_exit - let RoarAudio's sound server quit

roar\_terminate - let RoarAudio's sound server quit as soon as all clients quit

## SYNOPSIS

\#include \<roaraudio.h\>

int roar\_exit(struct roar\_connection \* con);

int roar\_terminate(struct roar\_connection \* con, int terminate);

## DESCRIPTION

Ask the sound server to quit.

roar\_exit() let the server quit without waiting for any clients. All streams and client connections will be closed cleanly.

roar\_terminate() will let the server quit as soon as all clients disconnects and all input streams ended. The listening socket will be closed. This is useful in case of restarting roard.

## PARAMETERS

- **con**

  An open control connection to the server.

- **terminate**

  Wait for all clients to disconnect and all streams to EOF in case of 1. In case of 0 roar\_terminate() is equal to roar\_exit().

## RETURN VALUE

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

## NOTES

Even when the call was successful you have to use [**roar\_disconnect**(3)](/roar_disconnect/3.md) to disconnect from the server.

## EXAMPLES

FIXME

## SEE ALSO

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