summaryrefslogtreecommitdiff
path: root/doc/user.rst
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-10-30 21:33:10 +0100
committerMax Kellermann <max@musicpd.org>2018-10-30 21:33:10 +0100
commit83d598bdfd89604db57d899e3afd4a1e5a9f3dfd (patch)
treef11a4d63516b75e1f74e8e3fa3eb7ac2e16176c3 /doc/user.rst
parent0ec31b4aa4c661e090c03aac6fff44a1220bc766 (diff)
doc/user.rst: add bind_to_address/port examples
Diffstat (limited to 'doc/user.rst')
-rw-r--r--doc/user.rst28
1 files changed, 24 insertions, 4 deletions
diff --git a/doc/user.rst b/doc/user.rst
index 85b2446ce..ea27a038a 100644
--- a/doc/user.rst
+++ b/doc/user.rst
@@ -461,13 +461,33 @@ Client Connections
Listeners
~~~~~~~~~
-The setting :code:`bind_to_address` specifies which addresses :program:`MPD` listens on for connections from clients. The default is "any", which binds to all available addresses.
+The setting :code:`bind_to_address` specifies which addresses
+:program:`MPD` listens on for connections from clients. It can be
+used multiple times to bind to more than one address. Example::
-You can set a port that is different from the global port setting, e.g. "localhost:6602". IPv6 addresses must be enclosed in square brackets if you want to configure a port, e.g. "[::1]:6602".
+ bind_to_address "192.168.1.42"
+ bind_to_address "127.0.0.1"
-To bind to a local socket (UNIX domain socket), specify an absolute path or a path starting with a tilde (~). Some clients default to connecting to :file:`/var/run/mpd/socket` so this may be a good choice.
+The default is "any", which binds to all available addresses.
+
+You can set a port that is different from the global port setting,
+e.g. "localhost:6602". IPv6 addresses must be enclosed in square
+brackets if you want to configure a port::
+
+ bind_to_address "[::1]:6602"
+
+To bind to a local socket (UNIX domain socket), specify an absolute
+path or a path starting with a tilde (~). Some clients default to
+connecting to :file:`/var/run/mpd/socket` so this may be a good
+choice::
+
+ bind_to_address "/var/run/mpd/socket"
+
+If no port is specified, the default port is 6600. This default can
+be changed with the port setting::
+
+ port "6601"
-If no port is specified, the default port is 6600. This default can be changed with the port setting.
Permissions and Passwords
~~~~~~~~~~~~~~~~~~~~~~~~~