TracNav menu
-
Home
- What is it?
- News
-
About PulseAudio
- Details
- Current Status
- Features
- Supported Operating Systems
- Related Software
- Screenshots
- Distributions
- In The Press
-
PulseAudio Community
- Mailing Lists
- IRC
- Tracking
- Patches & Bugs
- People
-
Download PulseAudio
- Requirements
- Source code
- Binaries
- Development Sources
-
Documentation
- First Steps
- The Perfect Setup
- FAQ
- Modules
- Command Line Interface
- Daemon Parameters
- Server Strings
- System-Wide Daemon
-
Developer Documentation
- Developing Clients
- Developing Modules
The Format of Server Strings
A server string contains information how to contact a PulseAudio server. You can specify it via $PULSE_SERVER or as first argument to pa_context_new() or pa_simple_new(). Normally it should be OK to leave it alone, but sometimes it is necessary to specify your own.
The server string is a space-seperated list of server addresses. A server address is parsed according the following rules:
- If it starts with a string enclosed in {} the address string is ignored unless the local hostname equals the string in the {}. Otherwise this prefix is skipped.
- If the string starts with / or unix: the remaining address string is taken as UNIX socket name.
- If the string starts with tcp4: or tcp: the remaining address string is split at the next colon, the first part is taken as hostname/IP address for IPv4, the second part as port number. If no colon is specified the default port number is assumed and the full remaining string is used as hostname/IP address.
- If the string starts with tcp6: a similar rule applies, but this time for IPv6
- Otherwise a similar rule applies, but it is left to the resolver whether IPv4 or IPv6 is used for the connection.
An example string:
{ecstasy}unix:/tmp/pulse-lennart/native tcp6:ecstasy.ring2.lan:4713 tcp:ecstasy.ring2.lan:4713
This tells PulseAudio to connect to the UNIX socket /tmp/pulse-lennart/native if the local host name is ecstasy. If that fails (or the hostname doesn't match) try to connect to host ecstasy.ring2.lan on port 4713 usng TCP/IPv6. If even that fails, connect to the same host/port with TCP/IPv4.
Another example string:
gurki
This tells PulseAudio to connect to the host gurki with either IPv4/IPv6 and that's it.
