---
name: "AuOpenServer"
section: "3nas"
platform: "linux"
package: "libaudio-dev"
version: "1.9.4-9"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/AuOpenServer"
---

# AuOpenServer(3nas)

connect to audio server

## Name

**AuOpenServer** - connect to audio server

## Synopsis

\#include \<audio/audiolib.h\>

AuServer \***AuOpenServer**(*servername*, *num\_authproto*, *authproto*, *num\_authdata*, *authdata*, *ret\_status*)\
\
     char \**servername*;\
\
     int *num\_authproto*;\
\
     char \**authproto*;\
\
     int *num\_authdata*;\
\
     char \**authdata*;\
\
     char \*\**return\_status*; /\* **RETURN** \*/

## Arguments

- *servername*

  Specifies the audio server name. This determines the server and communications domain to be used.

- *num\_authproto*

  Specifies the length of the connection authorization protocol name.

- *authproto*

  Specifies the name of the connection authorization protocol.

- *num\_authdata*

  Specifies the length of the connection authorization data.

- *authdata*

  Specifies the connection authorization data.

- *return\_status*

  If non-NULL, and the connection is refused, returns an error message.

## Description

**AuOpenServer** creates a connection to the specified audio server and returns a pointer to an **AuServer** structure or NULL, with *return\_status* (if non-NULL) pointing to an error message describing the reason, if it was unsuccessfull.

If *servername* is NULL or a pointer to NUL, **AuOpenServer** get the value from the enviroment. *servername* has the format *hostname*:*port* or *hostname*::*port*. If a double colon (::) separates the hostname and port number, **AuOpenServer** connects using DECnet streams. If a single colon (:) separates the hostname and port number, and the hostname is a host machine name, **AuOpenServer** connects using TCP streams. If a single colon (:) separates the hostname and port number, and the hostname is "unix", **AuOpenServer** connects using UNIX domain sockets (or Streams). If the hostname is not specified, **AuOpenServer** uses whatever it believes is the fastest transport.

## See Also

**AuCloseServer**, **AuServerName**.

audiolib - **Network Audio System** C Language Interface
