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

# roar\_vs\_run(3)

Iterate streams

## NAME

roar\_vs\_iterate, roar\_vs\_run - Iterate streams

## SYNOPSIS

\#include \<roaraudio.h\>

int     roar\_vs\_iterate       (roar\_vs\_t \* vss, int wait, int \* error);

int     roar\_vs\_run           (roar\_vs\_t \* vss, int \* error);

## DESCRIPTION

**roar\_vs\_iterate()** sends a block of data from the local buffer to the server or reads data from the server into the local buffer in blocking mode, or pushes or pulls data to or from server in file mode.

**roar\_vs\_run()** does the same as roar\_vs\_iterate() but loops until EOF or error.

## PARAMETERS

- **vss**

  The VS object to be used.

- **wait**

  If ROAR\_VS\_WAIT roar\_vs\_iterate() will block until data has been synced with the server. If ROAR\_VS\_NOWAIT roar\_vs\_iterate() will not block if no data can be send to or read from the server.

- **error**

  This is a pointer to a integer used to store the error value in case of error. This can be NULL if not used but it is very recommended to use this error value to report good error messages to the user.

## RETURN VALUE

On EOF these calls return 0. roar\_vs\_iterate() returns a positive value on non-EOF success. On error, -1 is returned.

## EXAMPLES

FIXME

## SEE ALSO

[**roarvs**(7)](/roarvs/7.md), [**libroar**(7)](/libroar/7.md), [**RoarAudio**(7)](/RoarAudio/7.md).
