build(deps): fix boost 1.87 compatibility (#3457)

This commit is contained in:
ReenigneArcher 2024-12-17 08:53:55 -05:00 committed by GitHub
commit 1e2fc2eb10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 14 deletions

View file

@ -46,8 +46,8 @@ namespace nvhttp {
class SunshineHTTPS: public SimpleWeb::HTTPS { class SunshineHTTPS: public SimpleWeb::HTTPS {
public: public:
SunshineHTTPS(boost::asio::io_service &io_service, boost::asio::ssl::context &ctx): SunshineHTTPS(boost::asio::io_context &io_context, boost::asio::ssl::context &ctx):
SimpleWeb::HTTPS(io_service, ctx) {} SimpleWeb::HTTPS(io_context, ctx) {}
virtual ~SunshineHTTPS() { virtual ~SunshineHTTPS() {
// Gracefully shutdown the TLS connection // Gracefully shutdown the TLS connection

View file

@ -92,8 +92,8 @@ namespace rtsp_stream {
class socket_t: public std::enable_shared_from_this<socket_t> { class socket_t: public std::enable_shared_from_this<socket_t> {
public: public:
socket_t(boost::asio::io_service &ios, std::function<void(tcp::socket &sock, launch_session_t &, msg_t &&)> &&handle_data_fn): socket_t(boost::asio::io_context &io_context, std::function<void(tcp::socket &sock, launch_session_t &, msg_t &&)> &&handle_data_fn):
handle_data_fn { std::move(handle_data_fn) }, sock { ios } {} handle_data_fn { std::move(handle_data_fn) }, sock { io_context } {}
/** /**
* @brief Queue an asynchronous read to begin the next message. * @brief Queue an asynchronous read to begin the next message.
@ -435,7 +435,7 @@ namespace rtsp_stream {
return -1; return -1;
} }
next_socket = std::make_shared<socket_t>(ios, [this](tcp::socket &sock, launch_session_t &session, msg_t &&msg) { next_socket = std::make_shared<socket_t>(io_context, [this](tcp::socket &sock, launch_session_t &session, msg_t &&msg) {
handle_msg(sock, session, std::move(msg)); handle_msg(sock, session, std::move(msg));
}); });
@ -449,7 +449,7 @@ namespace rtsp_stream {
template <class T, class X> template <class T, class X>
void void
iterate(std::chrono::duration<T, X> timeout) { iterate(std::chrono::duration<T, X> timeout) {
ios.run_one_for(timeout); io_context.run_one_for(timeout);
} }
void void
@ -494,7 +494,7 @@ namespace rtsp_stream {
} }
// Queue another asynchronous accept for the next incoming connection // Queue another asynchronous accept for the next incoming connection
next_socket = std::make_shared<socket_t>(ios, [this](tcp::socket &sock, launch_session_t &session, msg_t &&msg) { next_socket = std::make_shared<socket_t>(io_context, [this](tcp::socket &sock, launch_session_t &session, msg_t &&msg) {
handle_msg(sock, session, std::move(msg)); handle_msg(sock, session, std::move(msg));
}); });
acceptor.async_accept(next_socket->sock, [this](const auto &ec) { acceptor.async_accept(next_socket->sock, [this](const auto &ec) {
@ -618,8 +618,8 @@ namespace rtsp_stream {
std::chrono::steady_clock::time_point raised_timeout; std::chrono::steady_clock::time_point raised_timeout;
boost::asio::io_service ios; boost::asio::io_context io_context;
tcp::acceptor acceptor { ios }; tcp::acceptor acceptor { io_context };
std::shared_ptr<socket_t> next_socket; std::shared_ptr<socket_t> next_socket;
}; };

View file

@ -324,10 +324,10 @@ namespace stream {
std::thread audio_thread; std::thread audio_thread;
std::thread control_thread; std::thread control_thread;
asio::io_service io; asio::io_context io_context;
udp::socket video_sock { io }; udp::socket video_sock { io_context };
udp::socket audio_sock { io }; udp::socket audio_sock { io_context };
control_server_t control_server; control_server_t control_server;
}; };
@ -1183,7 +1183,7 @@ namespace stream {
auto &message_queue_queue = ctx.message_queue_queue; auto &message_queue_queue = ctx.message_queue_queue;
auto broadcast_shutdown_event = mail::man->event<bool>(mail::broadcast_shutdown); auto broadcast_shutdown_event = mail::man->event<bool>(mail::broadcast_shutdown);
auto &io = ctx.io; auto &io = ctx.io_context;
udp::endpoint peer; udp::endpoint peer;
@ -1777,7 +1777,7 @@ namespace stream {
audio_packets->stop(); audio_packets->stop();
ctx.message_queue_queue->stop(); ctx.message_queue_queue->stop();
ctx.io.stop(); ctx.io_context.stop();
ctx.video_sock.close(); ctx.video_sock.close();
ctx.audio_sock.close(); ctx.audio_sock.close();