When we can determine at compile time that the user has supplied a
single buffer, use send/recv rather than sendmsg/recvmsg, as the former
system calls can be faster.
Compiling an application with BOOST_ASIO_NO_DEPRECATED will now trigger
a compile error if any handler implements the asio_handler_allocate or
asio_handler_deallocate hooks.
This change fixes the scheduler and win_iocp_io_context destructors so
that they correctly stop the internal thread that was created in the
constructor. This fixes a deadlock that can occur when two threads
concurrently attempt to create the first I/O object associated with a
non-native I/O execution context.
This change enables move construction and assignment between different timer
types, provided the executor types are convertible. For example:
basic_waitable_timer<
clock_type,
traits_type,
io_context::executor_type
> timer1(my_io_context);
basic_waitable_timer<
clock_type,
traits_type,
executor // polymorphic wrapper
> timer2(std::move(timer1));
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.
On some versions of Windows, it seems that "self pipe trick" sockets may
be disconnected after a system sleep. To work around this, we recreate
the sockets following an error on read.
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.