muroar_write(3)

muroar_write3

Write data to a stream in a portable way

Usage

#include <muroar.h>

ssize_t muroar_write (muroar_t fh, const void * buf, size_t len);

Overview

This function writes a block of data to a connected stream. It exists to have a portable way to send the data to the sound server that does not depend on the underlying operating system.

Parameters

fh

The stream file handle connected to the server. This must be opend using muroar_stream(3).

buf

A pointer to the block of data that should be written.

len

The total length in byte of the data that should be written.

Return value

On success this call return the number of successful written bytes. On error, -1 is returned.

Notes

This function calls the underlying write function in a loop. If this returns less than the given length you should not re-try directly but wait at least some milisecunds.

Releases

6 releases since Debian 6.0 (Squeeze); the text changed 1 time.

  1. 6.0
  2. 7–11

History

This function first appeared in muRoar version 0.1beta0.

From libmuroar-dev 0.1.13-7 in Debian 11 (Bullseye). Parsed by carta from the page's man source.