2
0
mirror of https://github.com/boostorg/asio.git synced 2026-02-23 14:02:13 +00:00
Commit Graph

385 Commits

Author SHA1 Message Date
Christopher Kohlhoff
59bce59911 Add example showing file descriptor passing over local sockets.
Thanks to Heiko Hund for providing this example.
2022-03-02 21:57:42 +11:00
Christopher Kohlhoff
3cd04eee90 Add bind_allocator. 2022-03-02 21:57:41 +11:00
Christopher Kohlhoff
ff58013a23 Update copyright notices. 2022-03-02 21:23:52 +11:00
Christopher Kohlhoff
2257543bb6 Revision history. 2021-12-02 10:02:47 +11:00
Christopher Kohlhoff
9e6b1e18a5 Link to channels example from documentation. 2021-12-02 10:02:47 +11:00
Christopher Kohlhoff
5b81086626 Regenerate documentation. 2021-11-17 08:58:13 +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
08e0d07593 Ensure BOOST_ASIO_EXECUTION_EXECUTOR macro does not appear in generated docs. 2021-11-17 08:41:09 +11:00
Christopher Kohlhoff
25f89c77e5 Add clarifications to concurrency hint documentation. 2021-11-17 08:40:07 +11:00
Christopher Kohlhoff
50fae62f36 Revision history. 2021-11-04 11:15:22 +11:00
Christopher Kohlhoff
9e2444320d Regenerate documentation. 2021-11-04 01:58:49 +11:00
Christopher Kohlhoff
495e6367af Add experimental support for channels.
This adds experimental::channel and experimental::concurrent_channel.
Channels may be used to send completions as messages. For example:

  // Create a channel with no buffer space.
  channel<void(error_code, size_t)> ch(ctx);

  // The call to try_send fails as there is no buffer
  // space and no waiting receive operations.
  bool ok = ch.try_send(asio::error::eof, 123);
  assert(!ok);

  // The async_send operation blocks until a receive
  // operation consumes the message.
  ch.async_send(asio::error::eof, 123,
      [](error_code ec)
      {
        // ...
      });

  // The async_receive consumes the message. Both the
  // async_send and async_receive operations complete
  // immediately.
  ch.async_receive(
      [](error_code ec, size_t n)
      {
        // ...
      });
2021-11-04 01:56:32 +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
76701672f7 Regenerate documentation. 2021-10-29 20:56:28 +11:00
Christopher Kohlhoff
d8359719e1 Add support for registered buffers.
The mutable_registered_buffer and const_registered_buffer classes are
buffer sequence types that represented registered buffers. These buffers
are obtained by first performing a buffer registration:

  auto my_registration =
    asio::register_buffers(
        my_execution_context,
        my_buffer_sequence);

The registration object must be maintained for as long as the buffer
registration is required. The supplied buffer sequence represents the
memory location or locations that will be registered, and the caller
must ensure they remain valid for as long as they are registered. The
registration is automatically removed when the registration object is
destroyed. There can be at most one active registration per execution
context.

The registration object is a container of registered buffers. Buffers
may be obtained from it by iterating over the container, or via direct
index access:

  asio::mutable_registered_buffer my_buffer
    = my_registration[i];

The registered buffers may then be passed directly to operations:

  asio::async_read(my_socket, my_buffer,
      [](error_code ec, size_t n)
      {
        // ...
      });

Buffer registration supports the io_uring backend when used with read
and write operations on descriptors, files, pipes, and sockets.
2021-10-29 20:54:56 +11:00
Christopher Kohlhoff
eed9f6e50b Regenerate documentation. 2021-10-27 13:52:49 +11:00
Christopher Kohlhoff
b4fb33ec64 Add files and pipes to quick reference. 2021-10-27 13:50:20 +11:00
Christopher Kohlhoff
a6f695ae55 More doc fixes for per-operation cancellation. 2021-08-05 11:23:31 +10:00
Christopher Kohlhoff
b12ae3da40 Document per-operation cancellation for coroutines. 2021-08-05 10:31:54 +10:00
Christopher Kohlhoff
f0ee983dca Regenerate documentation. 2021-08-04 22:18:50 +10:00
Christopher Kohlhoff
211c1a33c9 Add experimental::coro to overview. 2021-08-04 21:17:00 +10:00
Christopher Kohlhoff
09fb579d33 Update revision history. 2021-08-04 21:16:59 +10:00
Christopher Kohlhoff
3a585b615e Add missing C++14 examples. 2021-08-04 21:16:59 +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
aafa4c6471 Document supported cancellation types. 2021-07-11 19:12:44 +10:00
Christopher Kohlhoff
2de6076965 Add revision history. 2021-07-08 13:14:38 +10:00
Christopher Kohlhoff
c47d0007c5 Exclude is_deferred trait specialisations from the docs. 2021-07-08 00:50:38 +10:00
Christopher Kohlhoff
17ef2577d8 Fix this_coro::throw_if_cancelled link in reference index. 2021-07-07 23:52:08 +10:00
Christopher Kohlhoff
0729e41f99 Regenerate documentation. 2021-07-07 22:47:10 +10:00
Christopher Kohlhoff
0cc4c7093a Clean up doc generation to accommodate new features. 2021-07-07 22:47:10 +10:00
Christopher Kohlhoff
9cc511935c Experimental features don't have convenience headers. 2021-07-07 22:47:10 +10:00
Christopher Kohlhoff
15b4f0eee2 Add new experimental facilities to the quick reference. 2021-07-07 22:47:10 +10:00
Christopher Kohlhoff
aa52f655e7 Add cancellation-related type requirements to quick reference. 2021-07-01 10:10:41 +10:00
Christopher Kohlhoff
2967887681 Fix CancellationSlot requirements table caption. 2021-07-01 10:08:52 +10:00
Christopher Kohlhoff
0e644260f6 Regenerate documentation. 2021-06-28 10:17:41 +10:00
Christopher Kohlhoff
0b0c4664d0 Add cancellation to reference documentation. 2021-06-28 10:14:54 +10:00
Christopher Kohlhoff
d9fffd9bce Regenerate platform macros documentation. 2021-06-05 17:43:30 +10:00
Christopher Kohlhoff
f807ab9aec Revision history. 2021-04-07 17:32:07 +10:00
Christopher Kohlhoff
efe2bc2051 Regenerate documentation. 2021-04-06 19:24:52 +10:00
Christopher Kohlhoff
06213e7378 Tell doxygen about the BOOST_ASIO_NOEXCEPT_IF macro. 2021-04-06 19:22:20 +10:00
Christopher Kohlhoff
3e88870e34 Exclude any_io_executor traits from documentation. 2021-03-04 15:45:56 +11:00
Christopher Kohlhoff
c970aba69b Use escaped names in index entries. 2021-03-04 15:45:56 +11:00
Christopher Kohlhoff
83503a2370 Regenerate documentation. 2021-03-04 10:00:02 +11:00
Christopher Kohlhoff
787d32a417 Add index entries for classes. 2021-03-04 09:09:00 +11:00
Christopher Kohlhoff
723982b867 Update copyright notices. 2021-02-25 08:29:05 +11:00
Christopher Kohlhoff
933e9373d2 Add missing SFINAE constraint to strand<>'s execute_member trait. 2020-12-03 12:14:41 +11:00
Christopher Kohlhoff
0e75749835 Fix revision history heading. 2020-12-01 10:08:36 +11:00
Christopher Kohlhoff
e2f224ab76 Revision history. 2020-12-01 10:03:15 +11:00