mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-12 15:51:45 +02:00
Add client support for websockets
This commit is contained in:
parent
9fbf273caa
commit
6c02252d84
13 changed files with 393 additions and 118 deletions
|
@ -18,6 +18,7 @@
|
|||
|
||||
// local headers
|
||||
#include "common/popl.hpp"
|
||||
#include "common/utils/string_utils.hpp"
|
||||
#include "controller.hpp"
|
||||
|
||||
#ifdef HAS_ALSA
|
||||
|
@ -37,6 +38,7 @@
|
|||
#include "common/aixlog.hpp"
|
||||
#include "common/snap_exception.hpp"
|
||||
#include "common/str_compat.hpp"
|
||||
#include "common/stream_uri.hpp"
|
||||
#include "common/version.hpp"
|
||||
|
||||
// 3rd party headers
|
||||
|
@ -202,6 +204,14 @@ int main(int argc, char** argv)
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!op.non_option_args().empty())
|
||||
{
|
||||
streamreader::StreamUri uri(op.non_option_args().front());
|
||||
settings.server.host = uri.host;
|
||||
settings.server.port = uri.port.value_or(settings.server.port);
|
||||
settings.server.protocol = uri.scheme;
|
||||
}
|
||||
|
||||
if (versionSwitch->is_set())
|
||||
{
|
||||
cout << "snapclient v" << version::code << (!version::rev().empty() ? (" (rev " + version::rev(8) + ")") : ("")) << "\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue