mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-07 18:54:06 +00:00
Replace boost::asio::io_service (deprecated since Boost 1.66) by boost::asio::io_context
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#include <string>
|
||||
|
||||
|
||||
Tcp_Communication::Tcp_Communication() : tcp_socket_(io_service_) {} // NOLINT
|
||||
Tcp_Communication::Tcp_Communication() : tcp_socket_(io_context_) {} // NOLINT
|
||||
|
||||
|
||||
Tcp_Communication::~Tcp_Communication() = default;
|
||||
@@ -47,7 +47,7 @@ int Tcp_Communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
|
||||
{
|
||||
// Specify IP type and port
|
||||
boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), d_port_);
|
||||
boost::asio::ip::tcp::acceptor acceptor(io_service_, endpoint);
|
||||
boost::asio::ip::tcp::acceptor acceptor(io_context_, endpoint);
|
||||
|
||||
if (d_port_ == d_port_ch0_)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
void close_tcp_connection(size_t d_port_);
|
||||
|
||||
private:
|
||||
boost::asio::io_service io_service_;
|
||||
boost::asio::io_context io_context_;
|
||||
boost::asio::ip::tcp::socket tcp_socket_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user