2
0
mirror of https://github.com/boostorg/asio.git synced 2026-02-27 15:12:12 +00:00
Commit Graph

81 Commits

Author SHA1 Message Date
Christopher Kohlhoff
95fa2c3708 Update timer overview in terms of waitable timers. 2022-04-05 21:59:02 +10:00
Christopher Kohlhoff
2d8df86af0 Add pipes to overview. 2022-04-05 21:59:02 +10:00
Christopher Kohlhoff
aa540d1aa8 Add files to overview. 2022-04-05 21:59:02 +10:00
Christopher Kohlhoff
61b48741cc Add completion token adapters to the overview. 2022-04-05 21:59:02 +10:00
Christopher Kohlhoff
5e42c30397 Add experimental::parallel_group to the overview. 2022-04-05 21:59:02 +10:00
Christopher Kohlhoff
fca5406f5e Add experimental::deferred to the overview. 2022-04-05 21:59:02 +10:00
Christopher Kohlhoff
903bab8f3c Move 'Futures' to 'Composition and Completion Tokens' section. 2022-04-05 21:59:02 +10:00
Christopher Kohlhoff
d35b87ff27 Update documentation for dispatch, post, and defer. 2022-03-04 21:06:50 +11:00
Christopher Kohlhoff
8e69bf3cf3 Clarify the non-concurrency guarantees made for allocators. 2022-03-04 20:57:25 +11:00
Christopher Kohlhoff
e935ce35ce Document per-operation cancellation for serial ports. 2022-03-02 22:13:21 +11:00
Christopher Kohlhoff
4e163b8ac1 Add cancellation_slot support to signal sets. 2022-03-02 22:13:21 +11:00
Christopher Kohlhoff
9208208d11 Add overview of asynchronous model. 2022-03-02 22:13:21 +11:00
Christopher Kohlhoff
ff58013a23 Update copyright notices. 2022-03-02 21:23:52 +11:00
Christopher Kohlhoff
da52edb30f Add overview documentation for error handling with C++20 coroutines. 2021-11-17 08:41:51 +11:00
Christopher Kohlhoff
952eb39254 Clean up coro overview. 2021-11-17 08:41:29 +11:00
Christopher Kohlhoff
25f89c77e5 Add clarifications to concurrency hint documentation. 2021-11-17 08:40:07 +11:00
Christopher Kohlhoff
5b72b72b72 Improvements to asio::experimental::coro.
* Added overload so member functions can provide an explicit executor.
* Added co_spawn for coro tasks.
* Added reference and overview documentation.
* Adopted awaitable cancellation model.
* Refactored implementation.
2021-11-04 01:41:25 +11:00
Christopher Kohlhoff
b12ae3da40 Document per-operation cancellation for coroutines. 2021-08-05 10:31:54 +10:00
Christopher Kohlhoff
211c1a33c9 Add experimental::coro to overview. 2021-08-04 21:17:00 +10:00
Christopher Kohlhoff
481a1820a8 Add documentation for per-operation cancellation. 2021-08-04 20:38:17 +10:00
Christopher Kohlhoff
5ab0a54714 Update C++20 coroutines overview. 2021-08-04 20:38:17 +10:00
Christopher Kohlhoff
723982b867 Update copyright notices. 2021-02-25 08:29:05 +11:00
Christopher Kohlhoff
c034e3906f Clarify when the select reactor is used on Windows. 2020-11-02 14:03:09 +11:00
Christopher Kohlhoff
18deb3dc5f Document that there are multiple types of I/O execution context. 2020-08-05 22:54:41 +10:00
Christopher Kohlhoff
3f12308c03 Add overloads of co_spawn that launch an awaitable.
This change allows us to write:

 co_spawn(executor,
     echo(std::move(socket)),
     detached);

instead of:

 co_spawn(executor,
     [socket = std::move(socket)]() mutable
     {
       return echo(std::move(socket));
     },
     detached);
2020-06-22 20:49:30 +10:00
Christopher Kohlhoff
cb60b08ff5 Add source location support to handler tracking.
The BOOST_ASIO_HANDLER_LOCATION((file_name, line, function_name)) macro
may be used to inform the handler tracking mechanism of a source
location. This macro declares an object that is placed on the stack.

When an asynchronous operation is launched with location information, it
outputs lines using the <action> 'n^m', prior to the 'n*m' line that
signifies the beginning of the asynchronous operation. For example:

    @asio|1589423304.861944|>7|ec=system:0,bytes_transferred=5
    @asio|1589423304.861952|7^8|in 'async_write' (./../../../include/asio/impl/write.hpp:330)
    @asio|1589423304.861952|7^8|called from 'do_write' (handler_tracking/async_tcp_echo_server.cpp:62)
    @asio|1589423304.861952|7^8|called from 'operator()' (handler_tracking/async_tcp_echo_server.cpp:51)
    @asio|1589423304.861952|7*8|socket@0x7ff61c008230.async_send
    @asio|1589423304.861975|.8|non_blocking_send,ec=system:0,bytes_transferred=5
    @asio|1589423304.861980|<7|

If std::source_location or std::experimental::source_location are
available, the use_awaitable_t token (when default-constructed or used
as a default completion token) will also cause handler tracking to
output a source location for each newly created asynchronous operation.
A use_awaitable_t object may also be explicitly constructed with location
information.
2020-06-22 20:46:29 +10:00
Christopher Kohlhoff
70e2c7db78 Update overview to reflect that handlers are only required to be move constructible. 2020-04-07 11:44:28 +10:00
Christopher Kohlhoff
62dad58386 Add ssl::host_name_verification.
The ssl::host_name_verification class is a drop-in replacement for
ssl::rfc2818_verification, which it supersedes. The
ssl::rfc2818_verification class has been marked as deprecated.

Thanks to Arvid Norberg for providing the implementation.
2020-04-07 11:44:28 +10:00
Christopher Kohlhoff
4b552cfd5b Update copyright notices. 2020-04-07 11:15:42 +10:00
Christopher Kohlhoff
5b6dc5ba74 Update diagrams to use io_context rather than io_service. 2019-12-05 00:34:39 +11:00
Christopher Kohlhoff
0cb51946bb Minor documentation fixes. 2019-12-03 19:59:09 +11:00
Christopher Kohlhoff
baca9a092f Promote coroutines TS support classes to asio namespace.
The awaitable<>, co_spawn(), this_coro, detached, and redirect_error
facilities have been moved from the asio::experimental namespace to
namespace asio. As part of this change, the this_coro::token() awaitable
has been superseded by the asio::use_awaitable completion token.

Please note that the use_awaitable and redirect_error completion tokens
work only with asynchronous operations that use the new form of
async_result with member function initiate(). Furthermore, when using
use_awaitable, please be aware that the asynchronous operation is not
initiated until co_await is applied to the awaitable<>.
2019-02-28 00:02:00 +11:00
Christopher Kohlhoff
ae04c26689 Update copyright notices. 2019-02-17 19:59:39 -10:00
Christopher Kohlhoff
c599605ce5 Add C++11 version of SSL example. 2018-12-05 13:38:52 +11:00
Christopher Kohlhoff
6f3ab889f2 Fix library name. 2018-12-05 13:27:37 +11:00
Christopher Kohlhoff
6cdd5782aa Fix typo in 'Streams, Short Reads and Short Writes' documentation section. 2018-11-05 23:03:16 +11:00
Christopher Kohlhoff
9941b40754 Add Coroutines TS overview and examples to documentation. 2018-04-03 22:55:21 +10:00
Christopher Kohlhoff
886839cf55 Update copyright notices. 2018-03-04 21:59:30 +11:00
Christopher Kohlhoff
6814d260d0 Clarification and tidy up. 2017-12-06 09:19:35 +11:00
Christopher Kohlhoff
31e5496b32 Fix typo. 2017-12-06 09:13:05 +11:00
Christopher Kohlhoff
2d7d67be48 Document the new concurrency hints. 2017-12-06 08:22:09 +11:00
Christopher Kohlhoff
c6f1b8ffc9 Use new move-enabled form of async_accept. 2017-12-05 07:37:41 +11:00
Christopher Kohlhoff
2c21c34a63 Document the new handler tracking features. 2017-12-03 21:54:45 +11:00
Christopher Kohlhoff
15e436d8fa Fix up reference to post(). 2017-12-02 09:03:15 +11:00
Christopher Kohlhoff
05ece65ac9 Show how to associate an executor using nested type and member function. 2017-12-02 09:03:15 +11:00
Christopher Kohlhoff
d83e96a444 Update allocation overview and examples to use new form. 2017-12-02 09:03:15 +11:00
Christopher Kohlhoff
b3550ef8be Fix typo in strands overview. 2017-12-02 09:03:14 +11:00
Christopher Kohlhoff
b77a45e2e5 Fix incorrect hyperlink target. 2017-12-02 09:03:14 +11:00
Christopher Kohlhoff
b60e92b13e Initial merge of Networking TS compatibility.
Merged from chriskohlhoff/asio master branch as of commit
4a4d28b0d24c53236e229bd1b5f378c9964b1ebb.
2017-10-23 21:48:43 +11:00
Christopher Kohlhoff
fba6c4ccbd Add limited support for regular file descriptors.
The epoll_reactor now supports the use of regular file descriptors with
posix::stream_descriptor, provided the I/O operations on them never fail
with EAGAIN or EWOULDBLOCK. If the descriptor cannot be added to the
epoll set using epoll_ctl, and errno is EPERM (indicating an unsupported
descriptor type), then no error condition is raised. Instead, any
operation which would require a trip through the reactor will fail.
2017-03-05 22:56:48 +11:00