Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
0c1a899f
Commit
0c1a899f
authored
Aug 07, 2018
by
1848
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added unix socket support in HttpdOutputPlugin
parent
52521d02
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
NEWS
NEWS
+1
-0
user.rst
doc/user.rst
+1
-1
HttpdOutputPlugin.cxx
src/output/plugins/httpd/HttpdOutputPlugin.cxx
+2
-7
No files found.
NEWS
View file @
0c1a899f
...
...
@@ -34,6 +34,7 @@ ver 0.21 (not yet released)
- shout: support the Shine encoder plugin
- sndio: remove support for the broken RoarAudio sndio emulation
- osx: initial support for DSD over PCM
- httpd_output: support for unix sockets
* mixer
- sndio: new mixer plugin
* encoder
...
...
doc/user.rst
View file @
0c1a899f
...
...
@@ -1705,7 +1705,7 @@ It is highly recommended to configure a fixed format, because a stream cannot sw
* - **port P**
- Binds the HTTP server to the specified port.
* - **bind_to_address ADDR**
- Binds the HTTP server to the specified address (IPv4
or IPv6
). Multiple addresses in parallel are not supported.
- Binds the HTTP server to the specified address (IPv4
, IPv6 or UNIX socket
). Multiple addresses in parallel are not supported.
* - **encoder NAME**
- Chooses an encoder plugin. A list of encoder plugins can be found in the encoder plugin reference :ref:`encoder_plugins`.
* - **max_clients MC**
...
...
src/output/plugins/httpd/HttpdOutputPlugin.cxx
View file @
0c1a899f
...
...
@@ -33,6 +33,7 @@
#include "util/Domain.hxx"
#include "util/DeleteDisposer.hxx"
#include "Log.hxx"
#include "config/Net.hxx"
#include <assert.h>
...
...
@@ -58,17 +59,11 @@ HttpdOutput::HttpdOutput(EventLoop &_loop, const ConfigBlock &block)
genre
=
block
.
GetBlockValue
(
"genre"
,
"Set genre in config"
);
website
=
block
.
GetBlockValue
(
"website"
,
"Set website in config"
);
unsigned
port
=
block
.
GetBlockValue
(
"port"
,
8000u
);
clients_max
=
block
.
GetBlockValue
(
"max_clients"
,
0u
);
/* set up bind_to_address */
const
char
*
bind_to_address
=
block
.
GetBlockValue
(
"bind_to_address"
);
if
(
bind_to_address
!=
nullptr
&&
strcmp
(
bind_to_address
,
"any"
)
!=
0
)
AddHost
(
bind_to_address
,
port
);
else
AddPort
(
port
);
ServerSocketAddGeneric
(
*
this
,
block
.
GetBlockValue
(
"bind_to_address"
),
block
.
GetBlockValue
(
"port"
,
8000u
));
/* determine content type */
content_type
=
prepared_encoder
->
GetMimeType
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment