Added unix socket support in HttpdOutputPlugin
This commit is contained in:
parent
52521d02ea
commit
0c1a899fbe
1
NEWS
1
NEWS
@ -34,6 +34,7 @@ ver 0.21 (not yet released)
|
|||||||
- shout: support the Shine encoder plugin
|
- shout: support the Shine encoder plugin
|
||||||
- sndio: remove support for the broken RoarAudio sndio emulation
|
- sndio: remove support for the broken RoarAudio sndio emulation
|
||||||
- osx: initial support for DSD over PCM
|
- osx: initial support for DSD over PCM
|
||||||
|
- httpd_output: support for unix sockets
|
||||||
* mixer
|
* mixer
|
||||||
- sndio: new mixer plugin
|
- sndio: new mixer plugin
|
||||||
* encoder
|
* encoder
|
||||||
|
@ -1705,7 +1705,7 @@ It is highly recommended to configure a fixed format, because a stream cannot sw
|
|||||||
* - **port P**
|
* - **port P**
|
||||||
- Binds the HTTP server to the specified port.
|
- Binds the HTTP server to the specified port.
|
||||||
* - **bind_to_address ADDR**
|
* - **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**
|
* - **encoder NAME**
|
||||||
- Chooses an encoder plugin. A list of encoder plugins can be found in the encoder plugin reference :ref:`encoder_plugins`.
|
- Chooses an encoder plugin. A list of encoder plugins can be found in the encoder plugin reference :ref:`encoder_plugins`.
|
||||||
* - **max_clients MC**
|
* - **max_clients MC**
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "util/Domain.hxx"
|
#include "util/Domain.hxx"
|
||||||
#include "util/DeleteDisposer.hxx"
|
#include "util/DeleteDisposer.hxx"
|
||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
|
#include "config/Net.hxx"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
@ -58,17 +59,11 @@ HttpdOutput::HttpdOutput(EventLoop &_loop, const ConfigBlock &block)
|
|||||||
genre = block.GetBlockValue("genre", "Set genre in config");
|
genre = block.GetBlockValue("genre", "Set genre in config");
|
||||||
website = block.GetBlockValue("website", "Set website in config");
|
website = block.GetBlockValue("website", "Set website in config");
|
||||||
|
|
||||||
unsigned port = block.GetBlockValue("port", 8000u);
|
|
||||||
|
|
||||||
clients_max = block.GetBlockValue("max_clients", 0u);
|
clients_max = block.GetBlockValue("max_clients", 0u);
|
||||||
|
|
||||||
/* set up bind_to_address */
|
/* set up bind_to_address */
|
||||||
|
|
||||||
const char *bind_to_address = block.GetBlockValue("bind_to_address");
|
ServerSocketAddGeneric(*this, block.GetBlockValue("bind_to_address"), block.GetBlockValue("port", 8000u));
|
||||||
if (bind_to_address != nullptr && strcmp(bind_to_address, "any") != 0)
|
|
||||||
AddHost(bind_to_address, port);
|
|
||||||
else
|
|
||||||
AddPort(port);
|
|
||||||
|
|
||||||
/* determine content type */
|
/* determine content type */
|
||||||
content_type = prepared_encoder->GetMimeType();
|
content_type = prepared_encoder->GetMimeType();
|
||||||
|
Loading…
Reference in New Issue
Block a user