repo_name
stringclasses
10 values
file_path
stringlengths
29
222
content
stringlengths
24
926k
extention
stringclasses
5 values
asio
data/projects/asio/example/cpp14/operations/composed_6.cpp
// // composed_6.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/deferred.hpp> #inc...
cpp
asio
data/projects/asio/example/cpp14/operations/composed_3.cpp
// // composed_3.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/bind_executor.hpp>...
cpp
asio
data/projects/asio/example/cpp14/operations/composed_7.cpp
// // composed_7.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/compose.hpp> #incl...
cpp
asio
data/projects/asio/example/cpp14/operations/callback_wrapper.cpp
// // callback_wrapper.cpp // ~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #...
cpp
asio
data/projects/asio/example/cpp14/operations/composed_8.cpp
// // composed_8.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/compose.hpp> #incl...
cpp
asio
data/projects/asio/example/cpp14/operations/composed_5.cpp
// // composed_5.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/deferred.hpp> #inc...
cpp
asio
data/projects/asio/example/cpp14/operations/composed_1.cpp
// // composed_1.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/deferred.hpp> #inc...
cpp
asio
data/projects/asio/example/cpp14/parallel_group/wait_for_one_error.cpp
// // wait_for_one_error.cpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hp...
cpp
asio
data/projects/asio/example/cpp14/parallel_group/wait_for_one_success.cpp
// // wait_for_one_error.cpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hp...
cpp
asio
data/projects/asio/example/cpp14/parallel_group/wait_for_all.cpp
// // wait_for_all.cpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include ...
cpp
asio
data/projects/asio/example/cpp14/parallel_group/wait_for_one.cpp
// // wait_for_one.cpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include ...
cpp
asio
data/projects/asio/example/cpp14/parallel_group/parallel_sort.cpp
// // parallel_sort.cpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #includ...
cpp
asio
data/projects/asio/example/cpp14/parallel_group/ranged_wait_for_all.cpp
// // ranged_wait_for_all.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio....
cpp
asio
data/projects/asio/example/cpp14/executors/bank_account_1.cpp
#include <boost/asio/execution.hpp> #include <boost/asio/static_thread_pool.hpp> #include <iostream> using boost::asio::static_thread_pool; namespace execution = boost::asio::execution; // Traditional active object pattern. // Member functions do not block. class bank_account { int balance_ = 0; mutable static_t...
cpp
asio
data/projects/asio/example/cpp14/executors/priority_scheduler.cpp
#include <boost/asio/execution.hpp> #include <condition_variable> #include <iostream> #include <memory> #include <mutex> #include <queue> namespace execution = boost::asio::execution; namespace custom_props { struct priority { template <typename T> static constexpr bool is_applicable_property_v = e...
cpp
asio
data/projects/asio/example/cpp14/executors/async_1.cpp
#include <boost/asio/associated_executor.hpp> #include <boost/asio/bind_executor.hpp> #include <boost/asio/execution.hpp> #include <boost/asio/static_thread_pool.hpp> #include <iostream> #include <string> using boost::asio::bind_executor; using boost::asio::get_associated_executor; using boost::asio::static_thread_poo...
cpp
asio
data/projects/asio/example/cpp14/executors/fork_join.cpp
#include <boost/asio/execution.hpp> #include <boost/asio/static_thread_pool.hpp> #include <algorithm> #include <condition_variable> #include <memory> #include <mutex> #include <queue> #include <thread> #include <numeric> using boost::asio::static_thread_pool; namespace execution = boost::asio::execution; // A fixed-s...
cpp
asio
data/projects/asio/example/cpp14/executors/pipeline.cpp
#include <boost/asio/associated_executor.hpp> #include <boost/asio/bind_executor.hpp> #include <boost/asio/execution.hpp> #include <condition_variable> #include <future> #include <memory> #include <mutex> #include <queue> #include <thread> #include <vector> #include <cctype> using boost::asio::executor_binder; using b...
cpp
asio
data/projects/asio/example/cpp14/executors/actor.cpp
#include <boost/asio/any_io_executor.hpp> #include <boost/asio/defer.hpp> #include <boost/asio/post.hpp> #include <boost/asio/strand.hpp> #include <boost/asio/system_executor.hpp> #include <condition_variable> #include <deque> #include <memory> #include <mutex> #include <typeinfo> #include <vector> using boost::asio::...
cpp
asio
data/projects/asio/example/cpp14/executors/async_2.cpp
#include <boost/asio/associated_executor.hpp> #include <boost/asio/bind_executor.hpp> #include <boost/asio/execution.hpp> #include <boost/asio/static_thread_pool.hpp> #include <iostream> #include <string> using boost::asio::bind_executor; using boost::asio::get_associated_executor; using boost::asio::static_thread_poo...
cpp
asio
data/projects/asio/example/cpp14/executors/bank_account_2.cpp
#include <boost/asio/execution.hpp> #include <boost/asio/static_thread_pool.hpp> #include <iostream> using boost::asio::static_thread_pool; namespace execution = boost::asio::execution; // Traditional active object pattern. // Member functions block until operation is finished. class bank_account { int balance_ = ...
cpp
asio
data/projects/asio/example/cpp14/deferred/deferred_7.cpp
// // deferred_7.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include <ios...
cpp
asio
data/projects/asio/example/cpp14/deferred/deferred_3.cpp
// // deferred_3.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include <ios...
cpp
asio
data/projects/asio/example/cpp14/deferred/deferred_6.cpp
// // deferred_6.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include <ios...
cpp
asio
data/projects/asio/example/cpp14/deferred/deferred_5.cpp
// // deferred_5.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include <ios...
cpp
asio
data/projects/asio/example/cpp14/deferred/deferred_2.cpp
// // deferred_2.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include <ios...
cpp
asio
data/projects/asio/example/cpp14/deferred/deferred_1.cpp
// // deferred_1.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include <ios...
cpp
asio
data/projects/asio/example/cpp14/deferred/deferred_4.cpp
// // deferred_4.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include <ios...
cpp
asio
data/projects/asio/example/cpp14/iostreams/http_client.cpp
// // http_client.cpp // ~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <iostream> #include <istream...
cpp
asio
data/projects/asio/example/cpp17/coroutines_ts/chat_server.cpp
// // chat_server.cpp // ~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <cstdlib> #include <deque> #...
cpp
asio
data/projects/asio/example/cpp17/coroutines_ts/range_based_for.cpp
// // range_based_for.cpp // ~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/co_spawn...
cpp
asio
data/projects/asio/example/cpp17/coroutines_ts/refactored_echo_server.cpp
// // refactored_echo_server.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost...
cpp
asio
data/projects/asio/example/cpp17/coroutines_ts/echo_server_with_default.cpp
// // echo_server_with_default.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <b...
cpp
asio
data/projects/asio/example/cpp17/coroutines_ts/echo_server_with_as_tuple_default.cpp
// // echo_server_with_as_tuple_default.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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.tx...
cpp
asio
data/projects/asio/example/cpp17/coroutines_ts/echo_server.cpp
// // echo_server.cpp // ~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/co_spawn.hpp> #i...
cpp
asio
data/projects/asio/example/cpp17/coroutines_ts/echo_server_with_as_single_default.cpp
// // echo_server_with_as_single_default.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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....
cpp
asio
data/projects/asio/example/cpp11/ssl/server.cpp
// // server.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <cstdlib> #include <functional> #inclu...
cpp
asio
data/projects/asio/example/cpp11/ssl/client.cpp
// // client.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <cstdlib> #include <cstring> #include ...
cpp
asio
data/projects/asio/example/cpp11/echo/blocking_udp_echo_server.cpp
// // blocking_udp_echo_server.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <c...
cpp
asio
data/projects/asio/example/cpp11/echo/blocking_tcp_echo_client.cpp
// // blocking_tcp_echo_client.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <c...
cpp
asio
data/projects/asio/example/cpp11/echo/blocking_udp_echo_client.cpp
// // blocking_udp_echo_client.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <c...
cpp
asio
data/projects/asio/example/cpp11/echo/blocking_tcp_echo_server.cpp
// // blocking_tcp_echo_server.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <c...
cpp
asio
data/projects/asio/example/cpp11/echo/async_udp_echo_server.cpp
// // async_udp_echo_server.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <cstdlib...
cpp
asio
data/projects/asio/example/cpp11/echo/async_tcp_echo_server.cpp
// // async_tcp_echo_server.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <cstdlib...
cpp
asio
data/projects/asio/example/cpp11/futures/daytime_client.cpp
// // daytime_client.cpp // ~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <array> #include <futu...
cpp
asio
data/projects/asio/example/cpp11/services/basic_logger.hpp
// // basic_logger.hpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #ifndef SERVICES_BASIC_LOGGER_HPP #...
hpp
asio
data/projects/asio/example/cpp11/services/logger.hpp
// // logger.hpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #ifndef SERVICES_LOGGER_HPP #define SERVICES_LO...
hpp
asio
data/projects/asio/example/cpp11/services/logger_service.cpp
// // logger_service.cpp // ~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include "logger_service.hpp"
cpp
asio
data/projects/asio/example/cpp11/services/logger_service.hpp
// // logger_service.hpp // ~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #ifndef SERVICES_LOGGER_SERVICE...
hpp
asio
data/projects/asio/example/cpp11/services/daytime_client.cpp
// // daytime_client.cpp // ~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #incl...
cpp
asio
data/projects/asio/example/cpp11/nonblocking/third_party_lib.cpp
// // third_party_lib.cpp // ~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #in...
cpp
asio
data/projects/asio/example/cpp11/operations/composed_4.cpp
// // composed_4.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/bind_executor.hpp>...
cpp
asio
data/projects/asio/example/cpp11/operations/composed_2.cpp
// // composed_2.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/deferred.hpp> #inc...
cpp
asio
data/projects/asio/example/cpp11/operations/composed_6.cpp
// // composed_6.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/deferred.hpp> #inc...
cpp
asio
data/projects/asio/example/cpp11/operations/composed_3.cpp
// // composed_3.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/bind_executor.hpp>...
cpp
asio
data/projects/asio/example/cpp11/operations/composed_7.cpp
// // composed_7.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/compose.hpp> #incl...
cpp
asio
data/projects/asio/example/cpp11/operations/composed_8.cpp
// // composed_8.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/compose.hpp> #incl...
cpp
asio
data/projects/asio/example/cpp11/operations/composed_5.cpp
// // composed_5.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/deferred.hpp> #inc...
cpp
asio
data/projects/asio/example/cpp11/operations/composed_1.cpp
// // composed_1.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/deferred.hpp> #inc...
cpp
asio
data/projects/asio/example/cpp11/parallel_group/wait_for_one_error.cpp
// // wait_for_one_error.cpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hp...
cpp
asio
data/projects/asio/example/cpp11/parallel_group/wait_for_one_success.cpp
// // wait_for_one_error.cpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hp...
cpp
asio
data/projects/asio/example/cpp11/parallel_group/wait_for_all.cpp
// // wait_for_all.cpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include ...
cpp
asio
data/projects/asio/example/cpp11/parallel_group/wait_for_one.cpp
// // wait_for_one.cpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include ...
cpp
asio
data/projects/asio/example/cpp11/parallel_group/ranged_wait_for_all.cpp
// // ranged_wait_for_all.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio....
cpp
asio
data/projects/asio/example/cpp11/multicast/sender.cpp
// // sender.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <iostream> #include <sstream> #include...
cpp
asio
data/projects/asio/example/cpp11/multicast/receiver.cpp
// // receiver.cpp // ~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <array> #include <iostream> #inclu...
cpp
asio
data/projects/asio/example/cpp11/executors/bank_account_1.cpp
#include <boost/asio/execution.hpp> #include <boost/asio/static_thread_pool.hpp> #include <iostream> using boost::asio::static_thread_pool; namespace execution = boost::asio::execution; // Traditional active object pattern. // Member functions do not block. class bank_account { int balance_ = 0; mutable static_t...
cpp
asio
data/projects/asio/example/cpp11/executors/priority_scheduler.cpp
#include <boost/asio/dispatch.hpp> #include <boost/asio/execution_context.hpp> #include <condition_variable> #include <iostream> #include <memory> #include <mutex> #include <queue> using boost::asio::dispatch; using boost::asio::execution_context; namespace execution = boost::asio::execution; class priority_scheduler...
cpp
asio
data/projects/asio/example/cpp11/executors/fork_join.cpp
#include <boost/asio/execution.hpp> #include <boost/asio/static_thread_pool.hpp> #include <algorithm> #include <condition_variable> #include <memory> #include <mutex> #include <queue> #include <thread> #include <numeric> using boost::asio::static_thread_pool; namespace execution = boost::asio::execution; // A fixed-s...
cpp
asio
data/projects/asio/example/cpp11/executors/pipeline.cpp
#include <boost/asio/associated_executor.hpp> #include <boost/asio/bind_executor.hpp> #include <boost/asio/execution_context.hpp> #include <boost/asio/post.hpp> #include <boost/asio/system_executor.hpp> #include <boost/asio/use_future.hpp> #include <condition_variable> #include <future> #include <memory> #include <mute...
cpp
asio
data/projects/asio/example/cpp11/executors/actor.cpp
#include <boost/asio/any_io_executor.hpp> #include <boost/asio/defer.hpp> #include <boost/asio/post.hpp> #include <boost/asio/strand.hpp> #include <boost/asio/system_executor.hpp> #include <condition_variable> #include <deque> #include <memory> #include <mutex> #include <typeinfo> #include <vector> using boost::asio::...
cpp
asio
data/projects/asio/example/cpp11/executors/bank_account_2.cpp
#include <boost/asio/execution.hpp> #include <boost/asio/static_thread_pool.hpp> #include <iostream> using boost::asio::static_thread_pool; namespace execution = boost::asio::execution; // Traditional active object pattern. // Member functions block until operation is finished. class bank_account { int balance_ = ...
cpp
asio
data/projects/asio/example/cpp11/chat/posix_chat_client.cpp
// // posix_chat_client.cpp // ~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <array> #include...
cpp
asio
data/projects/asio/example/cpp11/chat/chat_server.cpp
// // chat_server.cpp // ~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <cstdlib> #include <deque> #...
cpp
asio
data/projects/asio/example/cpp11/chat/chat_message.hpp
// // chat_message.hpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #ifndef CHAT_MESSAGE_HPP #define CH...
hpp
asio
data/projects/asio/example/cpp11/chat/chat_client.cpp
// // chat_client.cpp // ~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <cstdlib> #include <deque> #...
cpp
asio
data/projects/asio/example/cpp11/porthopper/server.cpp
// // server.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include <cmath> #inc...
cpp
asio
data/projects/asio/example/cpp11/porthopper/protocol.hpp
// // protocol.hpp // ~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #ifndef PORTHOPPER_PROTOCOL_HPP #define POR...
hpp
asio
data/projects/asio/example/cpp11/porthopper/client.cpp
// // client.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include <algorithm> ...
cpp
asio
data/projects/asio/example/cpp11/socks4/sync_client.cpp
// // sync_client.cpp // ~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <array> #include <iostream> ...
cpp
asio
data/projects/asio/example/cpp11/socks4/socks4.hpp
// // socks4.hpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #ifndef SOCKS4_HPP #define SOCKS4_HPP #include...
hpp
asio
data/projects/asio/example/cpp11/invocation/prioritised_handlers.cpp
// // prioritised_handlers.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asi...
cpp
asio
data/projects/asio/example/cpp11/deferred/deferred_2.cpp
// // deferred_2.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include <ios...
cpp
asio
data/projects/asio/example/cpp11/deferred/deferred_1.cpp
// // deferred_1.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include <ios...
cpp
asio
data/projects/asio/example/cpp11/windows/transmit_file.cpp
// // transmit_file.cpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <ctime> #include <functi...
cpp
asio
data/projects/asio/example/cpp11/timers/time_t_timer.cpp
// // time_t_timer.cpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio.hpp> #include ...
cpp
asio
data/projects/asio/example/cpp11/tutorial/daytime4/client.cpp
// // client.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <array> #include <iostream> #include <...
cpp
asio
data/projects/asio/example/cpp11/tutorial/timer4/timer.cpp
// // timer.cpp // ~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <functional> #include <iostream> #includ...
cpp
asio
data/projects/asio/example/cpp11/tutorial/timer5/timer.cpp
// // timer.cpp // ~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <functional> #include <iostream> #includ...
cpp
asio
data/projects/asio/example/cpp11/tutorial/daytime5/server.cpp
// // server.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <array> #include <ctime> #include <ios...
cpp
asio
data/projects/asio/example/cpp11/tutorial/timer1/timer.cpp
// // timer.cpp // ~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <iostream> #include <boost/asio.hpp> in...
cpp
asio
data/projects/asio/example/cpp11/tutorial/timer2/timer.cpp
// // timer.cpp // ~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <iostream> #include <boost/asio.hpp> vo...
cpp
asio
data/projects/asio/example/cpp11/tutorial/daytime3/server.cpp
// // server.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <ctime> #include <functional> #include...
cpp
asio
data/projects/asio/example/cpp11/tutorial/daytime7/server.cpp
// // server.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <array> #include <ctime> #include <fun...
cpp
asio
data/projects/asio/example/cpp11/tutorial/daytime1/client.cpp
// // client.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <array> #include <iostream> #include <...
cpp
asio
data/projects/asio/example/cpp11/tutorial/daytime2/server.cpp
// // server.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <ctime> #include <iostream> #include <...
cpp
asio
data/projects/asio/example/cpp11/tutorial/daytime6/server.cpp
// // server.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <array> #include <ctime> #include <fun...
cpp
asio
data/projects/asio/example/cpp11/tutorial/timer3/timer.cpp
// // timer.cpp // ~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <functional> #include <iostream> #includ...
cpp
asio
data/projects/asio/example/cpp11/spawn/parallel_grep.cpp
// // parallel_grep.cpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/detached.hpp...
cpp
asio
data/projects/asio/example/cpp11/spawn/echo_server.cpp
// // echo_server.cpp // ~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 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) // #include <boost/asio/detached.hpp> #i...
cpp