mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-24 14:36:15 +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
|
@ -354,14 +354,17 @@ void Controller::start()
|
|||
settings_.server.host = host;
|
||||
settings_.server.port = port;
|
||||
LOG(INFO, LOG_TAG) << "Found server " << settings_.server.host << ":" << settings_.server.port << "\n";
|
||||
clientConnection_ = make_unique<ClientConnection>(io_context_, settings_.server);
|
||||
clientConnection_ = make_unique<ClientConnectionTcp>(io_context_, settings_.server);
|
||||
worker();
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
clientConnection_ = make_unique<ClientConnection>(io_context_, settings_.server);
|
||||
if (settings_.server.protocol == "ws")
|
||||
clientConnection_ = make_unique<ClientConnectionWs>(io_context_, settings_.server);
|
||||
else
|
||||
clientConnection_ = make_unique<ClientConnectionTcp>(io_context_, settings_.server);
|
||||
worker();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue