summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/src/tests/performance/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio/src/tests/performance/client.cpp')
-rw-r--r--3rdparty/asio/src/tests/performance/client.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/3rdparty/asio/src/tests/performance/client.cpp b/3rdparty/asio/src/tests/performance/client.cpp
index 6851d32fc9e..720b909ad4a 100644
--- a/3rdparty/asio/src/tests/performance/client.cpp
+++ b/3rdparty/asio/src/tests/performance/client.cpp
@@ -2,7 +2,7 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -10,7 +10,7 @@
#include "asio.hpp"
#include <algorithm>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
#include <boost/mem_fn.hpp>
#include <iostream>
#include <list>
@@ -51,7 +51,7 @@ class session
{
public:
session(asio::io_context& ioc, size_t block_size, stats& s)
- : strand_(ioc),
+ : strand_(ioc.get_executor()),
socket_(ioc),
block_size_(block_size),
read_data_(new char[block_size]),
@@ -173,7 +173,7 @@ private:
}
private:
- asio::io_context::strand strand_;
+ asio::strand<asio::io_context::executor_type> strand_;
asio::ip::tcp::socket socket_;
size_t block_size_;
char* read_data_;
@@ -198,7 +198,7 @@ public:
sessions_(),
stats_()
{
- stop_timer_.expires_from_now(boost::posix_time::seconds(timeout));
+ stop_timer_.expires_after(asio::chrono::seconds(timeout));
stop_timer_.async_wait(boost::bind(&client::handle_timeout, this));
for (size_t i = 0; i < session_count; ++i)
@@ -228,7 +228,7 @@ public:
private:
asio::io_context& io_context_;
- asio::deadline_timer stop_timer_;
+ asio::steady_timer stop_timer_;
std::list<session*> sessions_;
stats stats_;
};