156 lines
8.9 KiB
HTML
156 lines
8.9 KiB
HTML
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
|
<title>C++20 Examples</title>
|
||
|
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
||
|
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||
|
<link rel="home" href="../../index.html" title="Asio">
|
||
|
<link rel="up" href="../examples.html" title="Examples">
|
||
|
<link rel="prev" href="cpp17_examples.html" title="C++17 Examples">
|
||
|
<link rel="next" href="../reference.html" title="Reference">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
</head>
|
||
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||
|
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../asio.png"></td></tr></table>
|
||
|
<hr>
|
||
|
<div class="spirit-nav">
|
||
|
<a accesskey="p" href="cpp17_examples.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../examples.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../next.png" alt="Next"></a>
|
||
|
</div>
|
||
|
<div class="section">
|
||
|
<div class="titlepage"><div><div><h3 class="title">
|
||
|
<a name="asio.examples.cpp20_examples"></a><a class="link" href="cpp20_examples.html" title="C++20 Examples">C++20 Examples</a>
|
||
|
</h3></div></div></div>
|
||
|
<h5>
|
||
|
<a name="asio.examples.cpp20_examples.h0"></a>
|
||
|
<span><a name="asio.examples.cpp20_examples.channels"></a></span><a class="link" href="cpp20_examples.html#asio.examples.cpp20_examples.channels">Channels</a>
|
||
|
</h5>
|
||
|
<p>
|
||
|
Example showing how to use a channel in conjunction with C++20 coroutines.
|
||
|
</p>
|
||
|
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/channels/throttling_proxy.cpp" target="_top">../src/examples/cpp20/channels/throttling_proxy.cpp</a>
|
||
|
</li></ul></div>
|
||
|
<h5>
|
||
|
<a name="asio.examples.cpp20_examples.h1"></a>
|
||
|
<span><a name="asio.examples.cpp20_examples.coroutines"></a></span><a class="link" href="cpp20_examples.html#asio.examples.cpp20_examples.coroutines">Coroutines</a>
|
||
|
</h5>
|
||
|
<p>
|
||
|
Examples showing how to implement a chain of asynchronous operations using
|
||
|
C++20 Coroutines.
|
||
|
</p>
|
||
|
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/coroutines/echo_server.cpp" target="_top">../src/examples/cpp20/coroutines/echo_server.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/coroutines/echo_server_with_default.cpp" target="_top">../src/examples/cpp20/coroutines/echo_server_with_default.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/coroutines/echo_server_with_as_tuple_default.cpp" target="_top">../src/examples/cpp20/coroutines/echo_server_with_as_tuple_default.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/coroutines/echo_server_with_as_single_default.cpp" target="_top">../src/examples/cpp20/coroutines/echo_server_with_as_single_default.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/coroutines/echo_server_with_deferred.cpp" target="_top">../src/examples/cpp20/coroutines/echo_server_with_deferred.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/coroutines/echo_server_with_deferred_default.cpp" target="_top">../src/examples/cpp20/coroutines/echo_server_with_deferred_default.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/coroutines/refactored_echo_server.cpp" target="_top">../src/examples/cpp20/coroutines/refactored_echo_server.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/coroutines/chat_server.cpp" target="_top">../src/examples/cpp20/coroutines/chat_server.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/coroutines/timeout.cpp" target="_top">../src/examples/cpp20/coroutines/timeout.cpp</a>
|
||
|
</li>
|
||
|
</ul></div>
|
||
|
<h5>
|
||
|
<a name="asio.examples.cpp20_examples.h2"></a>
|
||
|
<span><a name="asio.examples.cpp20_examples.operations"></a></span><a class="link" href="cpp20_examples.html#asio.examples.cpp20_examples.operations">Operations</a>
|
||
|
</h5>
|
||
|
<p>
|
||
|
Examples showing how to implement composed asynchronous operations as reusable
|
||
|
library functions.
|
||
|
</p>
|
||
|
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/operations/composed_1.cpp" target="_top">../src/examples/cpp20/operations/composed_1.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/operations/composed_2.cpp" target="_top">../src/examples/cpp20/operations/composed_2.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/operations/composed_3.cpp" target="_top">../src/examples/cpp20/operations/composed_3.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/operations/composed_4.cpp" target="_top">../src/examples/cpp20/operations/composed_4.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/operations/composed_5.cpp" target="_top">../src/examples/cpp20/operations/composed_5.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/operations/composed_6.cpp" target="_top">../src/examples/cpp20/operations/composed_6.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/operations/composed_7.cpp" target="_top">../src/examples/cpp20/operations/composed_7.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/operations/composed_8.cpp" target="_top">../src/examples/cpp20/operations/composed_8.cpp</a>
|
||
|
</li>
|
||
|
</ul></div>
|
||
|
<p>
|
||
|
Examples showing how to expose callback-based APIs as asynchronous operations.
|
||
|
</p>
|
||
|
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/operations/callback_wrapper.cpp" target="_top">../src/examples/cpp20/operations/callback_wrapper.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/operations/c_callback_wrapper.cpp" target="_top">../src/examples/cpp20/operations/c_callback_wrapper.cpp</a>
|
||
|
</li>
|
||
|
</ul></div>
|
||
|
<h5>
|
||
|
<a name="asio.examples.cpp20_examples.h3"></a>
|
||
|
<span><a name="asio.examples.cpp20_examples.type_erasure"></a></span><a class="link" href="cpp20_examples.html#asio.examples.cpp20_examples.type_erasure">Type
|
||
|
Erasure</a>
|
||
|
</h5>
|
||
|
<p>
|
||
|
Example showing how to use <a class="link" href="../reference/any_completion_handler.html" title="any_completion_handler"><code class="computeroutput"><span class="identifier">any_completion_handler</span></code></a> to enable
|
||
|
separate compilation of asynchronous operations.
|
||
|
</p>
|
||
|
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/type_erasure/main.cpp" target="_top">../src/examples/cpp20/type_erasure/main.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/type_erasure/line_reader.hpp" target="_top">../src/examples/cpp20/type_erasure/line_reader.hpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/type_erasure/stdin_line_reader.hpp" target="_top">../src/examples/cpp20/type_erasure/stdin_line_reader.hpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/type_erasure/stdin_line_reader.cpp" target="_top">../src/examples/cpp20/type_erasure/stdin_line_reader.cpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/type_erasure/sleep.hpp" target="_top">../src/examples/cpp20/type_erasure/sleep.hpp</a>
|
||
|
</li>
|
||
|
<li class="listitem">
|
||
|
<a href="../../../src/examples/cpp20/type_erasure/sleep.cpp" target="_top">../src/examples/cpp20/type_erasure/sleep.cpp</a>
|
||
|
</li>
|
||
|
</ul></div>
|
||
|
</div>
|
||
|
<div class="copyright-footer">Copyright © 2003-2023 Christopher M. Kohlhoff<p>
|
||
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||
|
</p>
|
||
|
</div>
|
||
|
<hr>
|
||
|
<div class="spirit-nav">
|
||
|
<a accesskey="p" href="cpp17_examples.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../examples.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../next.png" alt="Next"></a>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|