summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-11-15 04:15:13 +1100
committer Vas Crabb <vas@vastheman.com>2021-11-15 04:15:13 +1100
commit44ec6d2e0ee569202b75b73eea40972595866779 (patch)
treeb286443c264704198789514e0594dc24b3ca9f96 /3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp
parent137f254b918f1f1ebee43dfbed86793b0dae73eb (diff)
3rdparty: Updated ASIO to version 1.20.0.
The doc folder isn't included as it's pretty big. This required include/asio/detail/win_iocp_socket_accept_op.hpp due to mismatched order in the member declarations and initialiser list for the win_iocp_socket_accept_op class. I reversed the declaration order so it matches win_iocp_socket_move_accept_op.
Diffstat (limited to '3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp')
-rw-r--r--3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp b/3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp
index 483147e9552..9a54baedac4 100644
--- a/3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp
+++ b/3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp
@@ -2,7 +2,7 @@
// process_per_connection.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)
@@ -13,7 +13,7 @@
#include <asio/signal_set.hpp>
#include <asio/write.hpp>
#include <boost/array.hpp>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
#include <cstdlib>
#include <iostream>
#include <sys/types.h>
@@ -58,7 +58,7 @@ private:
void start_accept()
{
acceptor_.async_accept(socket_,
- boost::bind(&server::handle_accept, this, _1));
+ boost::bind(&server::handle_accept, this, boost::placeholders::_1));
}
void handle_accept(const asio::error_code& ec)
@@ -108,7 +108,8 @@ private:
void start_read()
{
socket_.async_read_some(asio::buffer(data_),
- boost::bind(&server::handle_read, this, _1, _2));
+ boost::bind(&server::handle_read, this,
+ boost::placeholders::_1, boost::placeholders::_2));
}
void handle_read(const asio::error_code& ec, std::size_t length)
@@ -120,7 +121,7 @@ private:
void start_write(std::size_t length)
{
asio::async_write(socket_, asio::buffer(data_, length),
- boost::bind(&server::handle_write, this, _1));
+ boost::bind(&server::handle_write, this, boost::placeholders::_1));
}
void handle_write(const asio::error_code& ec)