mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-01 10:21:46 +02:00
Support IPv6 in snapserver
This commit is contained in:
parent
b58ecfdcf1
commit
5f06f70562
2 changed files with 16 additions and 2 deletions
|
@ -615,7 +615,14 @@ void StreamServer::start()
|
|||
}
|
||||
streamManager_->start();
|
||||
|
||||
acceptor_ = make_shared<tcp::acceptor>(*io_service_, tcp::endpoint(tcp::v4(), settings_.port));
|
||||
asio::ip::address address = asio::ip::address::from_string("::");
|
||||
tcp::endpoint endpoint(address, settings_.port);
|
||||
acceptor_ = make_shared<tcp::acceptor>(*io_service_, endpoint);
|
||||
if (endpoint.protocol() == tcp::v6())
|
||||
{
|
||||
error_code ec;
|
||||
acceptor_->set_option(asio::ip::v6_only(false), ec);
|
||||
}
|
||||
startAccept();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue