2 / Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
4 / Distributed under the Boost Software License, Version 1.0. (See accompanying
5 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 [section:history Revision History]
10 [heading Asio 1.16.0 / Boost 1.72]
12 * Changed the `async_initiate` helper function to automatically deduce its
13 return type. This is enabled for C++11 or later.
14 * Changed all asynchronous operations to use automatically deduced return
15 types. This allows completion token implementations to incorporate the
16 asynchronous operation initiation into the initiating function's return type,
17 without type erasure. Note that C++14 or later is required to support
18 completion tokens that use per-operation return type deduction. For C++11 or
19 earlier, a completion token's async_result specialisation must still provide
20 the nested typedef `return_type`.
21 * Introduced three new concepts to support `async_initiate`.
22 * `completion_signature<T>`: Checks if `T` is a signature of the form
24 * `completion_handler_for<T, Signature>`: Checks if `T` is usable as a
25 completion handler with the specified signature.
26 * `completion_token_for<T, Signature>`: Checks if `T` is a completion token
27 that can be used with async_initiate and the specified signature.
28 * For backward compatibility with pre-concepts C++, the macros
29 `BOOST_ASIO_COMPLETION_SIGNATURE`, `BOOST_ASIO_COMPLETION_HANDLER_FOR`, and
30 `BOOST_ASIO_COMPLETION_TOKEN_FOR` are provided. These macros expand to
31 `typename` when concepts are unsupported.
32 * Added the nested template type `rebind_executor` to all I/O object types, as
33 a way to generically rebind them to use alternative I/O executors. For
36 using my_socket_type = tcp::socket::rebind_executor<my_executor_type>::other;
38 * Changed the asynchronous operations' initiation function objects to report
39 their associated I/O executor via the nested type `executor_type` and member
40 function `get_executor()`. Note that the presence of `executor_type` and
41 `get_executor()` should be treated as optional, and consequently it may be
42 preferable to access them via the `associated_executor` trait and the
43 `get_associated_executor()` helper function.
44 * Added the `default_completion_token` trait, so that every I/O executor type
45 now has an associated default completion token type. This trait may be used
46 in asynchronous operation declarations as follows:
50 typename CompletionToken =
51 typename default_completion_token<
52 typename IoObject::executor_type
57 CompletionToken&& token =
58 typename default_completion_token<
59 typename IoObject::executor_type
63 If not specialised, this trait type is `void`, meaning no default completion
64 token type is available for the given I/O executor.
65 * Specialised the `default_completion_token` trait for the `use_awaitable`
66 completion token, so that it may be used as shown in the following example:
68 auto socket = use_awaitable.as_default_on(tcp::socket(my_context));
70 co_await socket.async_connect(my_endpoint); // Defaults to use_awaitable.
72 In this example, the type of the `socket` object is transformed from
73 `tcp::socket` to have an I/O executor with the default completion token set
74 to `use_awaitable`. Alternatively, the socket type may be computed directly:
76 using tcp_socket = use_awaitable_t<>::as_default_on_t<tcp::socket>;
77 tcp_socket socket(my_context);
79 co_await socket.async_connect(my_endpoint); // Defaults to use_awaitable.
81 * Added missing `async_initiate` to the Windows-specific I/O objects'
82 asynchronous operations.
83 * Ensured that the executor type is propagated to newly accepted sockets.
84 When synchronously or asynchronously accepting a new connection, but
85 without specifying an executor or execution context, the accept
86 operation will now correctly propagate the executor type from the
87 acceptor to the socket. For example, if your acceptor type is:
89 basic_socket_acceptor<ip::tcp, my_executor_type>
91 then your accepted socket type will be:
93 basic_stream_socket<ip::tcp, my_executor_type>
95 * Changed to require that `Protocol` copy and move operations never throw.
96 * Changed to require that `Endpoint` default constructor and move operations
98 * Added the `noexcept` qualifier to protocol accessors.
99 * Added the `noexcept` qualifier to socket move constructors.
100 * Fixed issues associated with opening serial ports on Windows:
101 * Use the correct constant to initialise the RTS control flag.
102 * Specify a default baud rate (9600).
103 * Fixed a lost "outstanding work count" that can occur when an asynchronous
104 accept operation is automatically restarted.
106 [heading Asio 1.14.1 / Boost 1.71]
108 * Improved performance slightly by eliminating a redundant move construction
109 when completed handlers are dispatched.
110 * Eliminated a compiler warning by annotating a `case` fall-through in
111 the free function `connect()` implementation.
112 * Fixed the `is_*_buffer_sequence` detection traits for user-defined sequence
114 * Fixed some Windows-specific warnings about an incompatible pointer cast when
115 obtaining the `CancelIoEx` entry point.
116 * Changed to automatically set the defaults when opening a serial port on
118 * Changed the serial port `get_option()` member function to be const.
119 * Fixed a name hiding issue with the WinRT stream-oriented socket backend's
121 * Applied a minor fix to the documentation for `is_dynamic_buffer`.
122 * Added some support for Haiku OS.
123 * Added wolfSSL compatability.
124 * Changed to require C++17 or later for coroutines TS support with clang.
125 * Fixed a doxygen generation problem in the tutorial.
126 * Ensured example programs are correctly incorporated into the documentation.
128 [heading Asio 1.14.0 / Boost 1.70]
130 * Added custom I/O executor support to I/O objects.
131 * All I/O objects now have an additional `Executor` template parameter. This
132 template parameter defaults to the `asio::executor` type (the polymorphic
133 executor wrapper) but can be used to specify a user-defined executor
135 * I/O objects' constructors and functions that previously took an
136 `asio::io_context&` now accept either an `Executor` or a reference to a
137 concrete `ExecutionContext` (such as `asio::io_context` or
138 `asio::thread_pool`).
139 * Note: One potential source of breakage in existing user code is when reusing an
140 I/O object's `io_context` for constructing another I/O object, as in:
142 asio::steady_timer my_timer(my_socket.get_executor().context());
144 To fix this, either construct the second I/O object using the first I/O
145 object's executor:[br]
147 asio::steady_timer my_timer(my_socket.get_executor());
149 or otherwise explicitly pass the `io_context`:[br]
151 asio::steady_timer my_timer(my_io_context);
153 * The previously deprecated `get_io_context` and `get_io_service`
154 member functions have now been removed.
155 * The previously deprecated service template parameters, and the
156 corresponding classes, have now been removed.
157 * Added a new `async_result` form with an `initiate` static member function.
158 * The `async_result` template now supports a new form:
160 template <typename CompletionToken, typename Signature>
163 typedef /* ... */ return_type;
165 template <typename Initiation,
166 typename RawCompletionToken,
168 static return_type initiate(
169 Initiation&& initiation,
170 RawCompletionToken&& token,
174 * The `initiate` member function must: (a) transform the token into a
175 completion handler object `handler`; (b) cause the invocation of the
176 function object `initiation` as if by calling
177 `std::forward<Initiation>(initiation)(std::move(handler),
178 std::forward<Args>(args)...)`. Note that the invocation of `initiation`
179 may be deferred (e.g. lazily evaluated), in which case `initiation` and
180 `args` must be decay-copied and moved as required.
181 * A helper function template `async_initiate` has also been added as a
182 wrapper for the invocation of `async_result<>::initiate`. For backward
183 compatibility, this function supports both the old and new `async_result`
185 * The composed operations examples have been updated to use `async_initiate`.
186 * The previously deprecated `handler_type` trait and single-argument form of
187 `async_result` have now been removed.
188 * Updated the Coroutines TS support and promoted it to the `asio` namespace.
189 * The `awaitable<>`, `co_spawn`, `this_coro`, `detached`, and
190 `redirect_error` facilities have been moved from the `asio::experimental`
191 namespace to namespace `asio`. As part of this change, the
192 `this_coro::token()` awaitable has been superseded by the
193 `asio::use_awaitable` completion token.
194 * Please note that the `use_awaitable` and `redirect_error` completion tokens
195 work only with asynchronous operations that use the new form of
196 `async_result` with member function `initiate`. Furthermore, when using
197 `use_awaitable`, please be aware that the asynchronous operation is not
198 initiated until `co_await` is applied to the `awaitable<>`.
199 * Added a new `DynamicBuffer_v2` concept which is CopyConstructible.
200 * This change adds a new set of type requirements for dynamic buffers,
201 `DynamicBuffer_v2`, which supports copy construction. These new type
202 requirements enable dynamic buffers to be used as arguments to
203 user-defined composed operations, where the same dynamic buffer object
204 is used repeatedly for multiple underlying operations. For example:[br]
206 template <typename DynamicBuffer>
207 void echo_line(tcp::socket& sock, DynamicBuffer buf)
209 n = asio::read_until(sock, buf, '\n');
210 asio::write(sock, buf, asio::transfer_exactly(n));
213 * The original `DynamicBuffer` type requirements have been renamed to
214 `DynamicBuffer_v1`. These requirements continue to be compatible with the
216 * New type traits `is_dynamic_buffer_v1` and `is_dynamic_buffer_v2` have been
217 added to test for conformance to `DynamicBuffer_v1` and `DynamicBuffer_v2`
218 respectively. The existing `is_dynamic_buffer` trait has been retained and
219 delegates to `is_dynamic_buffer_v1` (unless `BOOST_ASIO_NO_DYNAMIC_BUFFER_V1` is
220 explicitly defined, in which case it delegates to `is_dynamic_buffer_v2`).
221 * For convenience, the `dynamic_string_buffer` and `dynamic_vector_buffer`
222 classes conform to both `DynamicBuffer_v1` and `DynamicBuffer_v2`
224 * When `BOOST_ASIO_NO_DYNAMIC_BUFFER_V1` is defined, all support for
225 `DynamicBuffer_v1` types and functions is #ifdef-ed out. Support for using
226 `basic_streambuf` with the `read`, `async_read`, `read_until`,
227 `async_read_until`, `write`, and `async_write` functions is also disabled
229 * Note: This change should have no impact on existing source code that simply
230 uses dynamic buffers in conjunction with Asio's composed operations.
231 * Added a new `async_compose` function that simplifies the implementation of
232 user-defined asynchronous operations.
233 * Added a `make_strand` function, which creates a `strand` with a deduced
234 `Executor` template argument.
235 * Relaxed the completion condition type requirements to only require
236 move-constructibility rather than copy-constructibility.
237 * Added a constructor for `local::basic_endpoint` that takes a `string_view`.
238 * Added the noexcept qualifier to various member functions of the
239 `ip::address`, `ip::address_v4`, `ip::address_v6`, `ip::basic_endpoint`, and
240 `executor_work_guard` classes.
241 * Added the noexcept qualifier to the `buffer_sequence_begin` and
242 `buffer_sequence_end` functions.
243 * Added a new `BOOST_ASIO_DISABLE_VISIBILITY` configuration `#define` that allows
244 visibility pragmas to be disabled. (Note: If symbols are hidden, extra care
245 must be taken to ensure that Asio types are not passed across shared
246 library API boundaries.)
247 * Enabled recycling of the memory used to type-erase a function object with the
248 polymorphic executor.
249 * Changed receive operations to return the correct number of bytes transferred
250 when truncation (`error::message_size`) occurs on a datagram-oriented socket.
251 * Fixed multicast behaviour on QNX by automatically applying `SO_REUSEPORT`
252 when the `reuse_address` option is set.
253 * Added inclusion of `unistd.h` when targeting Haiku OS, to fix feature detection.
254 * Added the `network_v[46].hpp` headers to the top-level convenience header.
255 * Fixed calculation of absolute timeout when the backend uses
256 `pthread_cond_timedwait`.
257 * Changed the range-based asynchronous connect operation to deduce the
258 `EndpointSequence` iterator type rather than assume the presence of a
259 `const_iterator` typedef.
260 * Fixed `buffer_sequence_begin` and `buffer_sequence_end` to prevent implicit
261 conversion. This change addresses an issue where a call to
262 `buffer_sequence_begin` or `buffer_sequence_end` could trigger an implicit
263 conversion to `const_buffer` or `mutable_buffer`. Whenever this implicit
264 conversion occurred, the return value of `buffer_sequence_begin` or
265 `buffer_sequence_end` would point to a temporary object.
266 * Ensured SSL handshake errors are propagated to the peer before the local
268 * Suppressed the `eof` error on SSL shutdown as it actually indicates success.
269 * Added a fallback error code for when we OpenSSL produces an
270 `SSL_ERROR_SYSCALL` result without an associated error.
271 * Changed composed asynchronous read and write operations to move, rather than
272 copy, the buffer sequence objects when the composed operation implementation
274 * Changed to use `<atomic>` when targeting apple/clang/libc++ with recent Xcode
275 versions, even for C++03. This fixes a warning about the deprecation of
277 * Fixed compile errors that occur when using the composed read and write
278 operations with MSVC 11.0, by disabling `decltype` support for that compiler.
279 * Increased the default value of `_WIN32_WINNT` to `0x0601` (Windows 7).
280 * Fixed `dispatch` documentation to note that it may call the supplied function
281 object in the current thread.
282 * Updated `post` and `defer` documentation to clarify the the distinction
284 * Fixed compilation errors in the read and write composed operations when used
286 * Fixed a Windows-specific issue where the execution context associated with
287 `system_executor` was not being correctly cleaned up on exit.
289 [heading Asio 1.12.2 / Boost 1.69]
291 * Fixed a problem with the detection of `std::future` availability with
293 * Fixed compile error in regex overload of `read_until`.
294 * Fixed a timer heap corruption issue that can occur when moving a cancelled
296 * Fixed detection of `std::experimental::string_view` and `std::string_view`
297 with newer clang/libc++.
298 * Fixed MSVC version detection for availability of `std::invoke_result`.
299 * Fixed the buffer sequence traits to test the new requirements, if `decltype`
301 * Fixed an MSVC issue when building with exceptions disabled.
302 * Added SSL context options for TLS v1.3.
303 * Added a compile-time test for TLS v1 support.
304 * Fixed the macro used to test for TLS v1.2 support.
305 * Prevented global objects from being created once per thread on Windows.
306 * Fixed a crash when using `size()`, `max_size()` or `empty()` on
307 default-constructed resolver results.
308 * Changed to move the return value in basic_resolver_results::begin() to avoid
310 * Enabled move support for the Intel Compiler.
311 * Fixed `std::string_view` detection issue when using clang-cl.
312 * Fixed the handler tracking operation name for
313 `io_context::executor_type::dispatch`.
314 * Fixed a buffer overflow that could occur when parsing an address string with
316 * Added examples showing how to write composed operations.
317 * Added C++11 versions of the Timeouts, Timers, SOCKS4 and SSL examples.
318 * Fixed minor issues in documentation and examples.
320 [heading Asio 1.12.1 / Boost 1.67]
322 * Added missing const qualifier to `basic_socket_acceptor::get_option`.
323 * Worked around a parsing error that occurs with some versions of gcc.
324 * Fixed broken code samples in tutorial.
325 * Added new experimental features. (Note that "experimental" features may be
326 changed without notice in subsequent releases.)
327 * Added `experimental::detached` completion token.
328 * Added `experimental::redirect_error` completion token.
329 * Added `experimental::co_spawn` facility for integration with the coroutines
330 technical specification.
331 * Updated timeout examples to use latest features.
332 * Used `asio::steady_timer` rather than `asio::deadline_timer`.
333 * Used `asio::dynamic_buffer` rather than `asio::streambuf`.
334 * Used timed `asio::io_context::run_for()` function for blocking clients.
335 * Added example showing a custom completion token for blocking with timeouts.
336 * Fixed unit tests to compile when `BOOST_ASIO_NO_DEPRECATED` is defined.
337 * Changed socket iostreams to use chrono by default, to fix compatibility with
338 the Networking TS. Define `BOOST_ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM`
339 to enable the old Boost.Date_Time interface in `basic_socket_streambuf` and
340 `basic_socket_iostream`.
341 * Updated examples to use chrono rather than Boost.Date_Time.
342 * Fixed an incorrect member function detector in the `is_dynamic_buffer` trait.
343 * Fixed an `async_result` incompatibility with deprecated `handler_type`.
344 * Added a missing move optimisation in the SSL stream implementation.
345 * Fixed incorrect `basic_resolver_results::value_type` typedef.
346 * Fixed a compile error with some OpenSSL versions when `SSL_OP_NO_COMPRESSION`
348 * Changed `add_certificate_authority` to process multiple certificates in a bundle.
349 * Eliminated deprecation warning with MSVC by using `std::invoke_result` rather
350 than `std::result_of`.
351 * Changed to use `std::string_view` for C++17 or later, and
352 `std::experimental::string_view` for C++14. Define the preprocessor macro
353 `BOOST_ASIO_DISABLE_STD_STRING_VIEW` to force the use of
354 std::experimental::string_view (assuming it is available) when compiling in
356 * Ensured `DynamicBuffer` template arguments are decayed before using in
358 * Changed documentation to distinguish legacy completion handlers (which are
359 still required to be CopyConstructible) from new MoveConstructible handlers.
360 * Suppressed a discarded return value warning in the buffer debugging support.
361 * Fixed `basic_yield_context` to work with completion signatures containing
362 reference parameters.
363 * Ensured that stackful coroutines launched using `spawn()` correctly store
364 decayed copies of their function and handler arguments.
365 * Fixed some compatibility issues with Android.
366 * Added cross-compilation support to Jamfiles.
367 * Fixed some minor portability issues in examples.
369 [heading Asio 1.12.0 / Boost 1.66]
371 * Implemented interface changes to reflect the Networking TS
372 ([@www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4656.pdf N4656]).
373 * See the [link boost_asio.net_ts list] of new interfaces and, where
374 applicable, the corresponding old interfaces that have been superseded.
375 * The service template parameters, and the corresponding classes, are disabled
376 by default. For example, instead of `basic_socket<Protocol, SocketService>` we
377 now have simply `basic_socket<Protocol>`. The old interface can be enabled by
378 defining the `BOOST_ASIO_ENABLE_OLD_SERVICES` macro.
379 * Removed previously deprecated functions.
380 * Added support for customised handler tracking.
381 * Added reactor-related (i.e. descriptor readiness) events to handler tracking.
382 * Added special [link boost_asio.overview.core.concurrency_hint concurrency
383 hint] values that may be used to disable locking on a per `io_context` basis.
384 * Enabled perfect forwarding for the first `ssl::stream<>` constructor argument.
385 * Added ability to release ownership of the underlying native socket. (Requires
386 Windows 8.1 or later when using the I/O completion port backend.)
388 [heading Asio 1.10.10 / Boost 1.65]
390 * Changed to require [^g++] versions >= 4.7 to use standard atomics, to fix
391 a linker error when using [^g++] 4.6 ([ticket 13121]).
392 * Enabled use of `constexpr` and variadic templates with recent MSVC versions.
393 * Fixed a race condition in the Linux epoll backend, which may occur when a
394 socket or descriptor is closed while another thread is blocked on epoll.
395 * Eliminated use of deprecated `auto_ptr`.
396 * Fixed misplaced use of `asio_handler_is_continuation` result in reactive
397 `async_accept` implementation.
398 * Changed to use `poll.h` rather than `sys/poll.h` on some modern POSIX
399 platforms ([ticket 12419]).
400 * Fixed MSVC intellisense detection.
401 * Disabled use of the `__thread` keyword extension for android/clang/x86
404 [heading Asio 1.10.9 / Boost 1.64]
406 * Added limited support for using regular file descriptors (where I/O
407 operations should never fail with `EAGAIN` or `EWOULDBLOCK`) with
408 `posix::stream_descriptor`, when using the Linux epoll backend.
409 * Changed to use `allocator_traits` to rebind allocators in C++11 or later.
410 * Eliminated a double "construction" issue in the converting move constructors.
411 * Added new `ssl::context_base` enumerations to enable support for any TLS
412 version, and improved consistency of SSL/TLS version handling across OpenSSL
414 * Applied more changes to address OpenSSL 1.1 compatibility.
415 * Fixed a compile error when OpenSSL compression is disabled at compile time.
416 * Suppressed some spurious unused variable warnings issued by [^gcc] ([ticket
418 * Worked around a new clang warning issued for usage of the comma operator.
419 * Fixed various header ordering problems.
420 * Changed to refer `std::atomic_thread_fence`, when available, to eliminate a
421 deprecated function warning on newest macOS SDK ([ticket 12482]).
422 * Added a workaround for broken `getaddrinfo` in Apple's NAT64 environment.
423 * Fixed an exception safety issue in the internal hash map implementation.
425 [heading Asio 1.10.8 / Boost 1.62]
427 * Added compatibility with OpenSSL 1.1.0 ([ticket 12238]).
428 * Fixed out-of-bounds iterator use in `asio::connect()` when the
429 `connect_condition` returns an end iterator ([ticket 12354]).
430 * Added a workaround for a move detection problem on MSVC 2015 Update 2
432 * Changed a workaround that was previously added for broken Windows firewalls
433 to only bind to 127.0.0.1 if `getsockname` reports 0.0.0.0 ([ticket
435 * Added call to `SSL_COMP_free_compression_methods` to fix two memory leaks
436 reported at shutdown, for OpenSSL versions >= 1.0.2 and < 1.1.0 ([ticket
438 * Fixed `use_future` compile error encountered on some standard library
439 implementations, by changing `std::allocator<void>` use to a non-void
441 * Enabled use of native `getaddrinfo` by default on Apple OSes, rather than
442 emulation in terms of `getipnodebyname`.
444 [heading Asio 1.10.7 / Boost 1.60]
446 * Added support for Windows 8.1 Store apps.
447 * Fixed macro multiple definition error on Microsoft Visual Studio 2015
449 * Changed Asio's SSL wrapper to respect OpenSSL's `OPENSSL_NO_SSL3` feature
450 test `#define` ([ticket 11754]).
451 * Changed Asio's SSL wrapper to use OpenSSL's new `SSL_CTX_clear_chain_certs`
452 function, if available.
453 * Suppressed a clang 3.6+ warning about unused typedefs ([ticket 11767]).
454 * Regenerated certificates used by SSL examples.
455 * Fixed buffer sizes passed to `strncat` in the `getaddrinfo` emulation and in
456 the SSL wrapper's password handling.
457 * Changed Windows backend to use non-macro `CreateEventW` rather than
458 `CreateEvent` ([ticket 11732]).
460 [heading Asio 1.10.6 / Boost 1.58]
462 * Ensured errors generated by Windows' `ConnectEx` function are mapped to their
463 portable equivalents ([ticket 10744]).
464 * Added new macro `BOOST_ASIO_DISABLE_CONNECTEX` to allow use of `ConnectEx` to
465 be explicitly disabled.
466 * Fixed a race condition in `windows::object_handle` when there are pending
467 wait operations on destruction ([ticket 10624]).
468 * Fixed IPv6 address parsing on FreeBSD, where a trailing scope ID would cause
469 conversion to fail with `EINVAL`.
470 * Worked around shared library visibility issues by ensuring Asio types use
471 default visibility ([ticket 9465], [ticket 11070]).
472 * Changed the SSL wrapper to call the password callback when loading an
473 in-memory key ([ticket 10828]).
474 * Fixed false SSL error reports by ensuring that the SSL error queue is cleared
475 prior to each operation.
476 * Fixed an `ssl::stream<>` bug that may result in spurious 'short read' errors.
477 * Removed a redundant null pointer check in the SSL engine ([ticket 10088]).
478 * Added options for disabling TLS v1.1 and v1.2 ([ticket 10690]).
479 * Removed use of deprecated OpenSSL function `ERR_remove_state`.
480 * Fixed detection of various C++11 features with Clang ([ticket 8835],
482 * Fixed detection of C++11 `std::addressof` with [^g++] ([ticket 10982]).
483 * Changed multicast test to treat certain `join_group` failures as non-fatal.
484 * Decoupled Asio unit tests from Boost.Test ([ticket 11116]).
485 * Changed the tutorial to use `std::endl` to ensure output is flushed.
486 * Fixed an unsigned integer overflow reported by Clang's integer sanitizer.
487 * Added support for move-only return types when using a `yield_context` object
488 with asynchronous operations.
489 * Changed `yield_context` to allow reentrant calls to the completion handler
490 from an initiating function.
491 * Updated detection of Windows Runtime to work with latest Windows SDK.
493 [heading Asio 1.10.5 / Boost 1.57]
495 * Fixed the [^kqueue] reactor so that it works on FreeBSD ([ticket 10606]).
496 * Fixed an issue in the [^kqueue] reactor which resulted in spinning when using
497 serial ports on Mac OS ([ticket 10496]).
498 * Fixed [^kqueue] reactor support for read-only file descriptors
500 * Fixed a compile error when using the [^/dev/poll] reactor ([ticket 10350],
502 * Changed the Windows backend to use `WSASocketW`, as `WSASocketA` has been
503 deprecated ([ticket 10534]).
504 * Fixed some warnings reported by Visual C++ 2013 ([ticket 10376]).
505 * Fixed integer type used in the WinRT version of the byte-order conversion
506 functions ([ticket 10539]).
507 * Changed documentation to indicate that `use_future` and `spawn()` are not
508 made available when including the `asio.hpp` convenience header ([ticket
510 * Explicitly marked `asio::strand` as deprecated. Use
511 `asio::io_service::strand` instead.
513 [heading Asio 1.10.4 / Boost 1.56]
515 * Stopped using certain Winsock functions that are marked as deprecated in the
516 latest Visual C++ and Windows SDK.
517 * Fixed a shadow variable warning on Windows.
518 * Fixed a regression in the [^kqueue] backend that was introduced in Asio
520 * Added a workaround for building the unit tests with [^gcc] on AIX.
522 [heading Asio 1.10.3]
524 * Worked around a [^gcc] problem to do with anonymous enums ([ticket 10042]).
525 * Reverted the Windows `HANDLE` backend change to ignore `ERROR_MORE_DATA`.
526 Instead, the error will be propagated as with any other (i.e. in an
527 `error_code` or thrown as a `system_error`), and the number of bytes
528 transferred will be returned. For code that needs to handle partial messages,
529 the `error_code` overload should be used ([ticket 10034]).
530 * Fixed an off-by-one error in the `signal_set` implementation's signal
531 number check ([ticket 9324]).
532 * Changed the Windows IOCP backend to not assume that
533 `SO_UPDATE_CONNECT_CONTEXT` is defined ([ticket 10016]).
534 * Fixed a Windows-specific issue, introduced in Asio 1.10.2, by using
535 `VerifyVersionInfo` rather than `GetVersionEx`, as `GetVersionEx` has been
537 * Changed to use SSE2 intrinsics rather than inline assembly, to allow the
538 Cray compiler to work.
540 [heading Asio 1.10.2]
542 * Fixed `asio::spawn()` to work correctly with new Boost.Coroutine interface
543 ([ticket 9442], [ticket 9928]).
544 * Ensured that incomplete `asio::spawn()` coroutines are correctly unwound when
545 cleaned up by the `io_service` destructor ([ticket 9731]).
546 * Fixed delegation of continuation hook for handlers produced by
547 `io_service::wrap()` and `strand::wrap()` ([ticket 9741]).
548 * Changed the Windows I/O completion port backend to use `ConnectEx`, if
549 available, for connection-oriented IP sockets.
550 * Changed the `io_service` backend for non-Windows (and non-IOCP Windows)
551 platforms to use a single condition variable per `io_service` instance.
552 This addresses a potential race condition when `run_one()` is used from
554 * Prevented integer overflow when computing timeouts based on some
555 `boost::chrono` and `std::chrono` clocks ([ticket 9662], [ticket 9778]).
556 * Made further changes to `EV_CLEAR` handling in the kqueue backend, to address
557 other cases where the `close()` system call may hang on Mac OS X.
558 * Fixed infinite recursion in implementation of
559 `resolver_query_base::flags::operator~` ([ticket 9548]).
560 * Made the `select` reactor more efficient on Windows for large numbers of
561 sockets ([ticket 9528]).
562 * Fixed a Windows-specific type-aliasing issue reported by [^gcc] ([ticket
564 * Prevented execution of compile-time-only buffer test to avoid triggering an
565 address sanitiser warning ([ticket 8295]).
566 * Disabled the `GetQueuedCompletionStatus` timeout workaround on recent
568 * Added support for string-based scope IDs when using link-local multicast
570 * Changed IPv6 multicast group join to use the address's scope ID as the
571 interface, if an interface is not explicitly specified.
572 * Fixed multicast test failure on Mac OS X and the BSDs by using a link-local
574 * Various minor documentation improvements ([ticket 8295], [ticket 9605],
577 [heading Asio 1.10.1 / Boost 1.55]
579 * Implemented a limited port to Windows Runtime. This support requires that the
580 language extensions be enabled. Due to the restricted facilities exposed by
581 the Windows Runtime API, the port also comes with the following caveats:
582 * The core facilities such as the `io_service`, `strand`, buffers, composed
583 operations, timers, etc., should all work as normal.
584 * For sockets, only client-side TCP is supported.
585 * Explicit binding of a client-side TCP socket is not supported.
586 * The `cancel()` function is not supported for sockets. Asynchronous
587 operations may only be cancelled by closing the socket.
588 * Operations that use `null_buffers` are not supported.
589 * Only `tcp::no_delay` and `socket_base::keep_alive` options are supported.
590 * Resolvers do not support service names, only numbers. I.e. you must
591 use "80" rather than "http".
592 * Most resolver query flags have no effect.
593 * Fixed a regression (introduced in Boost 1.54) where, on some platforms, errors
594 from `async_connect` were not correctly propagated through to the completion
595 handler ([ticket 8795]).
596 * Fixed a Windows-specific regression (introduced in Boost 1.54) that occurs
597 when multiple threads are running an `io_service`. When the bug occurs, the
598 result of an asynchronous operation (error and bytes tranferred) is
599 incorrectly discarded and zero values used instead. For TCP sockets this
600 results in spurious end-of-file notifications ([ticket 8933]).
601 * Fixed a bug in handler tracking, where it was not correctly printing out some
602 handler IDs ([ticket 8808]).
603 * Fixed the comparison used to test for successful synchronous accept
604 operations so that it works correctly with unsigned socket descriptors
606 * Ensured the signal number is correctly passed to the completion handler when
607 starting an `async_wait` on a signal that is already raised ([ticket 8738]).
608 * Suppressed a g++ 4.8+ warning about unused typedefs ([ticket 8980]).
609 * Enabled the move optimisation for handlers that use the default invocation
610 hook ([ticket 8624]).
611 * Clarified that programs must not issue overlapping `async_write_at`
612 operations ([ticket 8669]).
613 * Changed the Windows `HANDLE` backend to treat `ERROR_MORE_DATA` as a
614 non-fatal error when returned by `GetOverlappedResult` for a synchronous
615 read ([ticket 8722]).
616 * Visual C++ language extensions use `generic` as a keyword. Added a
617 workaround that renames the namespace to `cpp_generic` when those language
618 extensions are in effect.
619 * Fixed some asynchronous operations that missed out on getting `async_result`
620 support in Boost 1.54. In particular, the buffered stream templates have been
621 updated so that they adhere to current handler patterns ([ticket 9000],
623 * Enabled move support for Microsoft Visual Studio 2012 ([ticket 8959]).
624 * Added `use_future` support for Microsoft Visual Studio 2012.
625 * Removed a use of `std::min` in the Windows IOCP backend to avoid a
626 dependency on the `<algorithm>` header ([ticket 8758]).
627 * Eliminated some unnecessary handler copies.
628 * Fixed support for older versions of OpenSSL that do not provide the
629 `SSL_CTX_clear_options` function ([ticket 9273]).
630 * Fixed various minor and cosmetic issues in code and documentation
631 (including [ticket 8347], [ticket 8950], [ticket 8953], [ticket 8965],
632 [ticket 8997], [ticket 9230]).
634 [heading Asio 1.10.0 / Boost 1.54]
636 * Added new traits classes, `handler_type` and `async_result`, that allow the
637 customisation of the return type of an initiating function.
638 * Added the `asio::spawn()` function, a high-level wrapper for running
639 stackful coroutines, based on the Boost.Coroutine library. The `spawn()`
640 function enables programs to implement asynchronous logic in a synchronous
641 manner. For example: `size_t n = my_socket.async_read_some(my_buffer, yield);`.
642 For further information, see [link boost_asio.overview.core.spawn Stackful
644 * Added the `asio::use_future` special value, which provides first-class
645 support for returning a C++11 `std::future` from an asynchronous
646 operation's initiating function. For example:
647 `future<size_t> = my_socket.async_read_some(my_buffer, asio::use_future);`.
648 For further information, see [link boost_asio.overview.cpp2011.futures C++
649 2011 Support - Futures].
650 * Promoted the stackless coroutine class and macros to be part of Asio's
651 documented interface, rather than part of the HTTP server 4 example.
652 For further information, see [link boost_asio.overview.core.coroutine
653 Stackless Coroutines].
654 * Added a new handler hook called `asio_handler_is_continuation`.
655 Asynchronous operations may represent a continuation of the asynchronous
656 control flow associated with the current executing handler. The
657 `asio_handler_is_continuation` hook can be customised to return `true` if
658 this is the case, and Asio's implementation can use this knowledge to
659 optimise scheduling of the new handler. To cover common cases, Asio
660 customises the hook for strands, `spawn()` and composed asynchronous
662 * Added four new generic protocol classes, `generic::datagram_protocol`,
663 `generic::raw_protocol`, `generic::seq_packet_protocol` and
664 `generic::stream_protocol`, which implement the `Protocol` type
665 requirements, but allow the user to specify the address family (e.g.
666 `AF_INET`) and protocol type (e.g. `IPPROTO_TCP`) at runtime.
667 For further information, see [link
668 boost_asio.overview.networking.other_protocols Support for Other Protocols].
669 * Added C++11 move constructors that allow the conversion of a socket (or
670 acceptor) into a more generic type. For example, an `ip::tcp::socket` can
671 be converted into a `generic::stream_protocol::socket` via move
673 For further information, see [link
674 boost_asio.overview.networking.other_protocols Support for Other Protocols].
675 * Extended the `basic_socket_acceptor<>`'s `accept()` and `async_accept()`
676 functions to allow a new connection to be accepted directly into a socket
677 of a more generic type. For example, an `ip::tcp::acceptor` can be used to
678 accept into a `generic::stream_protocol::socket` object.
679 For further information, see [link
680 boost_asio.overview.networking.other_protocols Support for Other Protocols].
681 * Moved existing examples into a C++03-specific directory, and added a new
682 directory for C++11-specific examples. A limited subset of the C++03
683 examples have been converted to their C++11 equivalents.
684 * Various SSL enhancements. Thanks go to Nick Jones, on whose work these changes
686 * Added support for SSL handshakes with re-use of data already read from
687 the wire. New overloads of the `ssl::stream<>` class's `handshake()` and
688 `async_handshake()` functions have been added. These accept a
689 `ConstBufferSequence` to be used as initial input to the ssl engine for
690 the handshake procedure.
691 * Added support for creation of TLSv1.1 and TLSv1.2 `ssl::context` objects.
692 * Added a `set_verify_depth()` function to the `ssl::context` and
693 `ssl::stream<>` classes.
694 * Added the ability to load SSL certificate and key data from memory
695 buffers. New functions, `add_certificate_authority()`,
696 `use_certificate()`, `use_certificate_chain()`, `use_private_key()`,
697 `use_rsa_private_key()` and `use_tmp_dh()`, have been added to the
698 `ssl::context` class.
699 * Changed `ssl::context` to automatically disable SSL compression by
700 default. To enable, use the new `ssl::context::clear_options()` function,
701 as in `my_context.clear_options(ssl::context::no_compression)`.
702 * Fixed a potential deadlock in `signal_set` implementation.
703 * Fixed an error in acceptor example in documentation [ticket 8421].
704 * Fixed copy-paste errors in waitable timer documentation [ticket 8602].
705 * Added assertions to satisfy some code analysis tools [ticket 7739].
706 * Fixed a malformed `#warning` directive [ticket 7939].
707 * Fixed a potential data race in the Linux `epoll` implementation.
708 * Fixed a Windows-specific bug, where certain operations might generate an
709 `error_code` with an invalid (i.e. `NULL`) `error_category` [ticket 8613].
710 * Fixed `basic_waitable_timer`'s underlying implementation so that it can
711 handle any `time_point` value without overflowing the intermediate duration
713 * Fixed a problem with lost thread wakeups that can occur when making
714 concurrent calls to `run()` and `poll()` on the same `io_service` object
716 * Fixed implementation of asynchronous connect operation so that it can cope
717 with spurious readiness notifications from the reactor [ticket 7961].
718 * Fixed a memory leak in the `ssl::rfc2818_verification` class.
719 * Added a mechanism for disabling automatic Winsock initialisation [ticket
720 3605]. See the header file [^boost/asio/detail/winsock_init.hpp] for details.
722 [heading Asio 1.8.3 / Boost 1.53]
724 * Fixed some 64-to-32-bit conversion warnings ([ticket 7459]).
725 * Fixed some small errors in documentation and comments ([ticket 7761]).
726 * Fixed an error in the example embedded in `basic_socket::get_option`'s
727 documentation ([ticket 7562]).
728 * Changed to use `long` rather than `int` for SSL_CTX options, to match OpenSSL
730 * Changed to use `_snwprintf` to address a compile error due to the changed
731 `swprintf` signature in recent versions of MinGW ([ticket 7373]).
732 * Fixed a deadlock that can occur on Windows when shutting down a pool of
733 `io_service` threads due to running out of work ([ticket 7552]).
734 * Enabled the `noexcept` qualifier for error categories ([ticket 7797]).
735 * Changed UNIX domain socket example to treat errors from `accept` as non-fatal
737 * Added a small block recycling optimisation to improve default memory
738 allocation behaviour.
740 [heading Asio 1.8.2 / Boost 1.51]
742 * Fixed an incompatibility between `ip::tcp::iostream` and C++11
743 ([@https://svn.boost.org/trac/boost/ticket/7162 #7162]).
744 * Decorated GCC attribute names with underscores to prevent interaction
745 with user-defined macros
746 ([@https://svn.boost.org/trac/boost/ticket/6415 #6415]).
747 * Added missing `#include <cctype>`, needed for some versions of MinGW.
748 * Changed to use [^gcc]'s atomic builtins on ARM CPUs, when available
749 ([@https://svn.boost.org/trac/boost/ticket/7140 #7140]).
750 * Changed strand destruction to be a no-op, to allow strand objects to be
751 destroyed after their associated `io_service` has been destroyed.
752 * Added support for some newer versions of glibc which provide the
753 `epoll_create1()` function but always fail with `ENOSYS`
754 ([@https://svn.boost.org/trac/boost/ticket/7012 #7012]).
755 * Changed the SSL implementation to throw an exception if SSL engine
757 ([@https://svn.boost.org/trac/boost/ticket/6303 #6303]).
758 * Fixed another regression in `buffered_write_stream`
759 ([@https://svn.boost.org/trac/boost/ticket/6310 #6310]).
760 * Implemented various minor performance improvements, primarily targeted at
761 Linux x86 and x86-64 platforms.
763 [heading Asio 1.8.1 / Boost 1.50]
765 * Changed the `epoll_reactor` backend to do lazy registration for `EPOLLOUT`
767 * Fixed the `epoll_reactor` handling of out-of-band data, which was broken by
768 an incomplete fix in the last release.
769 * Changed Asio's SSL wrapper to respect OpenSSL's `OPENSSL_NO_ENGINE` feature
770 test `#define` ([@https://svn.boost.org/trac/boost/ticket/6432 #6432]).
771 * Fixed `windows::object_handle` so that it works with Windows compilers that
772 support C++11 move semantics (such as [^g++]).
773 * Improved the performance of strand rescheduling.
774 * Added support for [^g++] 4.7 when compiling in C++11 mode
775 ([@https://svn.boost.org/trac/boost/ticket/6620 #6620]).
776 * Fixed a problem where `signal_set` handlers were not being delivered when
777 the `io_service` was constructed with a `concurrency_hint` of 1
778 ([@https://svn.boost.org/trac/boost/ticket/6657 #6657]).
780 [heading Asio 1.8.0 / Boost 1.49]
782 * Added a new class template `basic_waitable_timer` based around the C++11 clock
783 type requirements. It may be used with the clocks from the C++11 `<chrono>`
784 library facility or, if those are not available, Boost.Chrono. The typedefs
785 `high_resolution_timer`, `steady_timer` and `system_timer` may be used to
786 create timer objects for the standard clock types.
787 * Added a new `windows::object_handle` class for performing waits on Windows
788 kernel objects. Thanks go to Boris Schaeling for contributing substantially
789 to the development of this feature.
790 * On Linux, `connect()` can return EAGAIN in certain circumstances. Remapped
791 this to another error so that it doesn't look like a non-blocking operation
792 ([@https://svn.boost.org/trac/boost/ticket/6048 #6048]).
793 * Fixed a compile error on NetBSD
794 ([@https://svn.boost.org/trac/boost/ticket/6098 #6098]).
795 * Fixed deadlock on Mac OS X
796 ([@https://svn.boost.org/trac/boost/ticket/6275 #6275]).
797 * Fixed a regression in `buffered_write_stream`
798 ([@https://svn.boost.org/trac/boost/ticket/6310 #6310]).
799 * Fixed a non-paged pool "leak" on Windows when an `io_service` is repeatedly
800 run without anything to do
801 ([@https://svn.boost.org/trac/boost/ticket/6321 #6321]).
802 * Reverted earlier change to allow some speculative operations to be performed
803 without holding the lock, as it introduced a race condition in some
804 multithreaded scenarios.
805 * Fixed a bug where the second buffer in an array of two buffers may be ignored
806 if the first buffer is empty.
808 [heading Asio 1.6.1 / Boost 1.48]
810 * Implemented various performance improvements, including:
811 * Using thread-local operation queues in single-threaded use cases (i.e. when
812 `concurrency_hint` is 1) to eliminate a lock/unlock pair.
813 * Allowing some `epoll_reactor` speculative operations to be performed
814 without holding the lock.
815 * Improving locality of reference by performing an `epoll_reactor`'s I/O
816 operation immediately before the corresponding handler is called. This also
817 improves scalability across CPUs when multiple threads are running the
819 * Specialising asynchronous read and write operations for buffer sequences
820 that are arrays (`boost::array` or `std::array`) of exactly two buffers.
821 * Fixed a compile error in the regex overload of `async_read_until`
822 ([@https://svn.boost.org/trac/boost/ticket/5688 #5688]).
823 * Fixed a Windows-specific compile error by explicitly specifying the
824 `signal()` function from the global namespace
825 ([@https://svn.boost.org/trac/boost/ticket/5722 #5722]).
826 * Changed the `deadline_timer` implementation so that it does not read the
827 clock unless the timer heap is non-empty.
828 * Changed the SSL stream's buffers' sizes so that they are large enough to hold
829 a complete TLS record ([@https://svn.boost.org/trac/boost/ticket/5854 #5854]).
830 * Fixed the behaviour of the synchronous `null_buffers` operations so that they
831 obey the user's non-blocking setting
832 ([@https://svn.boost.org/trac/boost/ticket/5756 #5756]).
833 * Changed to set the size of the select `fd_set` at runtime when using Windows.
834 * Disabled an MSVC warning due to const qualifier being applied to function type.
835 * Fixed a crash that occurs when using the Intel C++ compiler
836 ([@https://svn.boost.org/trac/boost/ticket/5763 #5763]).
837 * Changed the initialisation of the OpenSSL library so that it supports all
838 available algorithms.
839 * Fixed the SSL error mapping used when the session is gracefully shut down.
840 * Added some latency test programs.
841 * Clarified that a read operation ends when the buffer is full
842 ([@https://svn.boost.org/trac/boost/ticket/5999 #5999]).
843 * Fixed an exception safety issue in `epoll_reactor` initialisation
844 ([@https://svn.boost.org/trac/boost/ticket/6006 #6006]).
845 * Made the number of strand implementations configurable by defining
846 `BOOST_ASIO_STRAND_IMPLEMENTATIONS` to the desired number.
847 * Added support for a new `BOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION` flag
848 which switches the allocation of strand implementations to use a round-robin
849 approach rather than hashing.
850 * Fixed potential strand starvation issue that can occur when `strand.post()`
853 [heading Asio 1.6.0 / Boost 1.47]
855 * Added support for signal handling, using a new class called `signal_set`.
856 Programs may add one or more signals to the set, and then perform an
857 `async_wait()` operation. The specified handler will be called when one of
858 the signals occurs. The same signal number may be registered with multiple
859 `signal_set` objects, however the signal number must be used only with Asio.
860 Addresses [@https://svn.boost.org/trac/boost/ticket/2879 #2879].
861 * Added handler tracking, a new debugging aid. When enabled by defining
862 `BOOST_ASIO_ENABLE_HANDLER_TRACKING`, Asio writes debugging output to the
863 standard error stream. The output records asynchronous operations and the
864 relationships between their handlers. It may be post-processed using the
865 included [^handlerviz.pl] tool to create a visual representation of the
866 handlers (requires GraphViz).
867 * Added support for timeouts on socket iostreams, such as `ip::tcp::iostream`.
868 A timeout is set by calling `expires_at()` or `expires_from_now()` to
869 establish a deadline. Any socket operations which occur past the deadline
870 will put the iostream into a bad state.
871 * Added a new `error()` member function to socket iostreams, for retrieving the
872 error code from the most recent system call.
873 * Added a new `basic_deadline_timer::cancel_one()` function. This function lets
874 you cancel a single waiting handler on a timer. Handlers are cancelled in
876 * Added a new `transfer_exactly()` completion condition. This can be used to
877 send or receive a specified number of bytes even if the total size of the
878 buffer (or buffer sequence) is larger.
879 * Added new free functions `connect()` and `async_connect()`. These operations
880 try each endpoint in a list until the socket is successfully connected, and
881 are useful for creating TCP clients that work with both IPv4 and IPv6.
882 * Extended the `buffer_size()` function so that it works for buffer sequences
883 in addition to individual buffers.
884 * Added a new `buffer_copy()` function that can be used to copy the raw bytes
885 between individual buffers and buffer sequences.
886 * Added new non-throwing overloads of `read()`, `read_at()`, `write()` and
887 `write_at()` that do not require a completion condition.
888 * Added friendlier compiler errors for when a completion handler does not meet
889 the necessary type requirements. When C++0x is available (currently supported
890 for [^g++] 4.5 or later, and MSVC 10), `static_assert` is also used to
891 generate an informative error message. This checking may be disabled by
892 defining `BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS`.
893 * Added a new, completely rewritten SSL implementation. The new implementation
894 compiles faster, shows substantially improved performance, and supports
895 custom memory allocation and handler invocation. It includes new API features
896 such as certificate verification callbacks and has improved error reporting.
897 The new implementation is source-compatible with the old for most uses.
898 However, if necessary, the old implementation may still be used by defining
899 `BOOST_ASIO_ENABLE_OLD_SSL`.
900 Addresses [@https://svn.boost.org/trac/boost/ticket/3702 #3702],
901 [@https://svn.boost.org/trac/boost/ticket/3958 #3958].
902 * Changed the separate compilation support such that, to use Asio's SSL
903 capabilities, you should also include `boost/asio/ssl/impl/src.hpp` in one
904 source file in your program.
905 * Changed the SSL implementation to support build environments where SSL v2 is
906 explicitly disabled ([@https://svn.boost.org/trac/boost/ticket/5453 #5453]).
907 * Made the `is_loopback()`, `is_unspecified()` and `is_multicast()` functions
908 consistently available across the `ip::address`, `ip::address_v4` and
909 `ip::address_v6` classes
910 ([@https://svn.boost.org/trac/boost/ticket/3939 #3939]).
911 * Added new `non_blocking()` functions for managing the non-blocking behaviour
912 of a socket or descriptor. The `io_control()` commands named `non_blocking_io`
913 are now deprecated in favour of these new functions.
914 * Added new `native_non_blocking()` functions for managing the non-blocking
915 mode of the underlying socket or descriptor. These functions are intended to
916 allow the encapsulation of arbitrary non-blocking system calls as
917 asynchronous operations, in a way that is transparent to the user of the
918 socket object. The functions have no effect on the behaviour of the
919 synchronous operations of the socket or descriptor.
920 * Added the `io_control()` member function for socket acceptors
921 ([@https://svn.boost.org/trac/boost/ticket/3297 #3297]).
922 * Added a `release()` member function to posix descriptors. This function
923 releases ownership of the underlying native descriptor to the caller.
924 Addresses [@https://svn.boost.org/trac/boost/ticket/3900 #3900].
925 * Added support for sequenced packet sockets (`SOCK_SEQPACKET`).
926 * Added a new `io_service::stopped()` function that can be used to determine
927 whether the `io_service` has stopped (i.e. a `reset()` call is needed prior
928 to any further calls to `run()`, `run_one()`, `poll()` or `poll_one()`).
929 * For consistency with the C++0x standard library, deprecated the `native_type`
930 typedefs in favour of `native_handle_type`, and the `native()` member
931 functions in favour of `native_handle()`.
932 * Added support for C++0x move construction and assignment to sockets, serial
933 ports, POSIX descriptors and Windows handles.
934 * Reduced the copying of handler function objects.
935 * Added support for C++0x move construction to further reduce (and in some
936 cases eliminate) copying of handler objects.
937 * Added support for the `fork()` system call. Programs that use `fork()` must
938 call `io_service.notify_fork()` at the appropriate times. Two new examples
939 have been added showing how to use this feature. Addresses
940 [@https://svn.boost.org/trac/boost/ticket/3238 #3238],
941 [@https://svn.boost.org/trac/boost/ticket/4162 #4162].
942 * Cleaned up the handling of errors reported by the `close()` system call. In
943 particular, assume that most operating systems won't have `close()` fail with
944 `EWOULDBLOCK`, but if it does then set the blocking mode and restart the call.
945 If any other error occurs, assume the descriptor is closed. Addresses
946 [@https://svn.boost.org/trac/boost/ticket/3307 #3307].
947 * Added new `asio::buffer()` overloads for `std::array`, when available.
948 * Changed the implementation to use the C++0x standard library templates
949 `array`, `shared_ptr`, `weak_ptr` and `atomic` when they are available,
950 rather than the Boost equivalents.
951 * Use C++0x variadic templates when available, rather than generating function
952 overloads using Boost.Preprocessor.
953 * Changed exception reporting to include the function name in exception `what()`
955 * Fixed insufficient initialisers warning with MinGW.
956 * Changed the `shutdown_service()` member functions to be private.
957 * Added archetypes for testing socket option functions.
958 * Changed the Boost.Asio examples so that they don't use Boost.Thread's
959 convenience header. Use the header file that is specifically for the
960 boost::thread class instead.
961 * Removed the dependency on OS-provided macros for the well-known IPv4 and IPv6
962 addresses. This should eliminate annoying "missing braces around initializer"
963 warnings ([@https://svn.boost.org/trac/boost/ticket/3741 #3741]).
964 * Reduced the size of `ip::basic_endpoint<>` objects (such as
965 `ip::tcp::endpoint` and `ip::udp::endpoint`).
966 * Changed the reactor backends to assume that any descriptors or sockets added
967 using `assign()` may have been `dup()`-ed, and so require explicit
968 deregistration from the reactor
969 ([@https://svn.boost.org/trac/boost/ticket/4971 #4971]).
970 * Removed the deprecated member functions named `io_service()`. The
971 `get_io_service()` member functions should be used instead.
972 * Removed the deprecated typedefs `resolver_query` and `resolver_iterator` from
973 the `ip::tcp`, `ip::udp` and `ip::icmp` classes.
974 * Modified the `buffers_iterator<>` and `ip::basic_resolver_iterator` classes
975 so that the value_type typedefs are non-const byte types.
976 * Fixed warnings reported by g++'s [^-Wshadow] compiler option
977 ([@https://svn.boost.org/trac/boost/ticket/3905 #3905]).
978 * Added an explicit cast to convert the `FIONBIO` constant to int, to suppress
979 a compiler warning on some platforms
980 ([@https://svn.boost.org/trac/boost/ticket/5128 #5128]).
981 * Changed most examples to treat a failure by an accept operation as non-fatal
982 ([@https://svn.boost.org/trac/boost/ticket/5124 #5124]).
983 * Fixed an error in the [^tick_count_timer] example by making the duration type
984 signed. Previously, a wait on an already-passed deadline would not return for
985 a very long time ([@https://svn.boost.org/trac/boost/ticket/5418 #5418]).
987 [heading Asio 1.4.9 / Boost 1.46.1]
989 * `EV_ONESHOT` seems to cause problems on some versions of Mac OS X, with the
990 `io_service` destructor getting stuck inside the `close()` system call.
991 Changed the kqueue backend to use `EV_CLEAR` instead
992 ([@https://svn.boost.org/trac/boost/ticket/5021 #5021]).
993 * Fixed compile failures with some versions of [^g++] due to the use of
994 anonymous enums ([@https://svn.boost.org/trac/boost/ticket/4883 #4883]).
995 * Fixed a bug on kqueue-based platforms, where some system calls that
996 repeatedly fail with `EWOULDBLOCK` are not correctly re-registered with
998 * Changed `asio::streambuf` to ensure that its internal pointers are updated
999 correctly after the data has been modified using `std::streambuf` member
1001 * Fixed a bug that prevented the linger socket option from working on platforms
1004 [heading Asio 1.4.8 / Boost 1.46]
1006 * Fixed an integer overflow problem that occurs when
1007 `ip::address_v4::broadcast()` is used on 64-bit platforms.
1008 * Fixed a problem on older Linux kernels (where epoll is used without timerfd
1009 support) that prevents timely delivery of deadline_timer handlers, after the
1010 program has been running for some time
1011 ([@https://svn.boost.org/trac/boost/ticket/5045 #5045]).
1013 [heading Asio 1.4.7 / Boost 1.45]
1015 * Fixed a problem on kqueue-based platforms where a `deadline_timer` may
1016 never fire if the `io_service` is running in a background thread
1017 ([@https://svn.boost.org/trac/boost/ticket/4568 #4568]).
1018 * Fixed a const-correctness issue that prevented valid uses of
1019 `has_service<>` from compiling
1020 ([@https://svn.boost.org/trac/boost/ticket/4638 #4638]).
1021 * Fixed MinGW cross-compilation
1022 ([@https://svn.boost.org/trac/boost/ticket/4491 #4491]).
1023 * Removed dependency on deprecated Boost.System functions
1024 ([@https://svn.boost.org/trac/boost/ticket/4672 #4672]).
1025 * Ensured `close()`\/`closesocket()` failures are correctly propagated
1026 ([@https://svn.boost.org/trac/boost/ticket/4573 #4573]).
1027 * Added a check for errors returned by `InitializeCriticalSectionAndSpinCount`
1028 ([@https://svn.boost.org/trac/boost/ticket/4574 #4574]).
1029 * Added support for hardware flow control on QNX
1030 ([@https://svn.boost.org/trac/boost/ticket/4625 #4625]).
1031 * Always use `pselect()` on HP-UX, if it is available
1032 ([@https://svn.boost.org/trac/boost/ticket/4578 #4578]).
1033 * Ensured handler arguments are passed as lvalues
1034 ([@https://svn.boost.org/trac/boost/ticket/4744 #4744]).
1035 * Fixed Windows build when thread support is disabled
1036 ([@https://svn.boost.org/trac/boost/ticket/4680 #4680]).
1037 * Fixed a Windows-specific problem where `deadline_timer` objects with expiry
1038 times set more than 5 minutes in the future may never expire
1039 ([@https://svn.boost.org/trac/boost/ticket/4745 #4745]).
1040 * Fixed the `resolver` backend on BSD platforms so that an empty service name
1041 resolves to port number `0`, as per the documentation
1042 ([@https://svn.boost.org/trac/boost/ticket/4690 #4690]).
1043 * Fixed read operations so that they do not accept buffer sequences of type
1044 `const_buffers_1` ([@https://svn.boost.org/trac/boost/ticket/4746 #4746]).
1045 * Redefined `Protocol` and `id` to avoid clashing with Objective-C++ keywords
1046 ([@https://svn.boost.org/trac/boost/ticket/4191 #4191]).
1047 * Fixed a `vector` reallocation performance issue that can occur when there are
1048 many active `deadline_timer` objects
1049 ([@https://svn.boost.org/trac/boost/ticket/4780 #4780]).
1050 * Fixed the kqueue backend so that it compiles on NetBSD
1051 ([@https://svn.boost.org/trac/boost/ticket/4662 #4662]).
1052 * Fixed the socket `io_control()` implementation on 64-bit Mac OS X and BSD
1053 platforms ([@https://svn.boost.org/trac/boost/ticket/4782 #4782]).
1054 * Fixed a Windows-specific problem where failures from `accept()` are
1055 incorrectly treated as successes
1056 ([@https://svn.boost.org/trac/boost/ticket/4859 #4859]).
1057 * Deprecated the separate compilation header `<boost/asio/impl/src.cpp>` in
1058 favour of `<boost/asio/impl/src.hpp>`
1059 ([@https://svn.boost.org/trac/boost/ticket/4560 #4560]).
1061 [heading Asio 1.4.6 / Boost 1.44]
1063 * Reduced compile times. (Note that some programs may need to add additional
1064 `#include`s, e.g. if the program uses `boost::array` but does not explicitly
1065 include `<boost/array.hpp>`.)
1066 * Reduced the size of generated code.
1067 * Refactored `deadline_timer` implementation to improve performance.
1068 * Improved multiprocessor scalability on Windows by using a dedicated hidden
1069 thread to wait for timers.
1070 * Improved performance of `asio::streambuf` with `async_read()` and
1071 `async_read_until()`. These read operations now use the existing capacity of
1072 the `streambuf` when reading, rather than limiting the read to 512 bytes.
1073 * Added optional separate compilation. To enable, add
1074 `#include <boost/asio/impl/src.cpp>` to one source file in a program, then
1075 build the program with `BOOST_ASIO_SEPARATE_COMPILATION` defined in the
1076 project\/compiler settings. Alternatively, `BOOST_ASIO_DYN_LINK` may be
1077 defined to build a separately-compiled Asio as part of a shared library.
1078 * Added new macro `BOOST_ASIO_DISABLE_FENCED_BLOCK` to permit the disabling of
1079 memory fences around completion handlers, even if thread support is enabled.
1080 * Reworked timeout examples to better illustrate typical use cases.
1081 * Ensured that handler arguments are passed as `const` types.
1082 * Fixed incorrect parameter order in `null_buffers` variant of `async_send_to`
1083 ([@https://svn.boost.org/trac/boost/ticket/4170 #4170]).
1084 * Ensured `unsigned char` is used with `isdigit` in `getaddrinfo` emulation
1085 ([@https://svn.boost.org/trac/boost/ticket/4201 #4201]).
1086 * Fixed handling of very small but non-zero timeouts
1087 ([@https://svn.boost.org/trac/boost/ticket/4205 #4205]).
1088 * Fixed crash that occurred when an empty buffer sequence was passed to a
1089 composed read or write operation.
1090 * Added missing `operator+` overload in `buffers_iterator`
1091 ([@https://svn.boost.org/trac/boost/ticket/4382 #4382]).
1092 * Implemented cancellation of `null_buffers` operations on Windows.
1094 [heading Asio 1.4.5 / Boost 1.43]
1096 * Improved performance.
1097 * Reduced compile times.
1098 * Reduced the size of generated code.
1099 * Extended the guarantee that background threads don't call user code to all
1100 asynchronous operations
1101 ([@https://svn.boost.org/trac/boost/ticket/3923 #3923]).
1102 * Changed to use edge-triggered epoll on Linux.
1103 * Changed to use `timerfd` for dispatching timers on Linux, when available.
1104 * Changed to use one-shot notifications with kqueue on Mac OS X and BSD
1106 * Added a bitmask type `ip::resolver_query_base::flags` as per the TR2 proposal.
1107 This type prevents implicit conversion from `int` to `flags`, allowing the
1108 compiler to catch cases where users incorrectly pass a numeric port number as
1110 * Added `#define NOMINMAX` for all Windows compilers. Users can define
1111 `BOOST_ASIO_NO_NOMINMAX` to suppress this definition
1112 ([@https://svn.boost.org/trac/boost/ticket/3901 #3901]).
1113 * Fixed a bug where 0-byte asynchronous reads were incorrectly passing an
1114 `error::eof` result to the completion handler
1115 ([@https://svn.boost.org/trac/boost/ticket/4023 #4023]).
1116 * Changed the `io_control()` member functions to always call `ioctl` on the
1117 underlying descriptor when modifying blocking mode
1118 ([@https://svn.boost.org/trac/boost/ticket/3307 #3307]).
1119 * Changed the resolver implementation to longer require the typedefs
1120 `InternetProtocol::resolver_query` and `InternetProtocol::resolver_iterator`,
1121 as neither typedef is part of the documented `InternetProtocol` requirements.
1122 The corresponding typedefs in the `ip::tcp`, `ip::udp` and `ip::icmp` classes
1123 have been deprecated.
1124 * Fixed out-of-band handling for reactors not based on `select()`.
1125 * Added new `BOOST_ASIO_DISABLE_THREADS` macro that allows Asio's threading
1126 support to be independently disabled.
1127 * Minor documentation improvements.
1129 [heading Asio 1.4.4 / Boost 1.42]
1131 * Added a new HTTP Server 4 example illustrating the use of stackless coroutines
1133 * Changed handler allocation and invocation to use `boost::addressof` to get the
1134 address of handler objects, rather than applying `operator&` directly
1135 ([@https://svn.boost.org/trac/boost/ticket/2977 #2977]).
1136 * Restricted MSVC buffer debugging workaround to 2008, as it causes a crash with
1137 2010 beta 2 ([@https://svn.boost.org/trac/boost/ticket/3796 #3796],
1138 [@https://svn.boost.org/trac/boost/ticket/3822 #3822]).
1139 * Fixed a problem with the lifetime of handler memory, where Windows needs the
1140 `OVERLAPPED` structure to be valid until both the initiating function call
1141 has returned and the completion packet has been delivered.
1142 * Don't block signals while performing system calls, but instead restart the
1143 calls if they are interrupted.
1144 * Documented the guarantee made by strand objects with respect to order of
1146 * Changed strands to use a pool of implementations, to make copying of strands
1148 * Ensured that kqueue support is enabled for BSD platforms
1149 ([@https://svn.boost.org/trac/boost/ticket/3626 #3626]).
1150 * Added a `boost_` prefix to the `extern "C"` thread entry point function
1151 ([@https://svn.boost.org/trac/boost/ticket/3809 #3809]).
1152 * In `getaddrinfo` emulation, only check the socket type (`SOCK_STREAM` or
1153 `SOCK_DGRAM`) if a service name has been specified. This should allow the
1154 emulation to work with raw sockets.
1155 * Added a workaround for some broken Windows firewalls that make a socket
1156 appear bound to 0.0.0.0 when it is in fact bound to 127.0.0.1.
1157 * Applied a fix for reported excessive CPU usage under Solaris
1158 ([@https://svn.boost.org/trac/boost/ticket/3670 #3670]).
1159 * Added some support for platforms that use older compilers such as g++ 2.95
1160 ([@https://svn.boost.org/trac/boost/ticket/3743 #3743]).
1162 [heading Asio 1.4.3 / Boost 1.40]
1164 * Added a new ping example to illustrate the use of ICMP sockets.
1165 * Changed the `buffered*_stream<>` templates to treat 0-byte reads and writes as
1166 no-ops, to comply with the documented type requirements for `SyncReadStream`,
1167 `AsyncReadStream`, `SyncWriteStream` and `AsyncWriteStream`.
1168 * Changed some instances of the `throw` keyword to `boost::throw_exception()` to
1169 allow Asio to be used when exception support is disabled. Note that the SSL
1170 wrappers still require exception support
1171 ([@https://svn.boost.org/trac/boost/ticket/2754 #2754]).
1172 * Made Asio compatible with the OpenSSL 1.0 beta
1173 ([@https://svn.boost.org/trac/boost/ticket/3256 #3256]).
1174 * Eliminated a redundant system call in the Solaris [^/dev/poll] backend.
1175 * Fixed a bug in resizing of the bucket array in the internal hash maps
1176 ([@https://svn.boost.org/trac/boost/ticket/3095 #3095]).
1177 * Ensured correct propagation of the error code when a synchronous accept fails
1178 ([@https://svn.boost.org/trac/boost/ticket/3216 #3216]).
1179 * Ensured correct propagation of the error code when a synchronous read or
1180 write on a Windows HANDLE fails.
1181 * Fixed failures reported when `_GLIBCXX_DEBUG` is defined
1182 ([@https://svn.boost.org/trac/boost/ticket/3098 #3098]).
1183 * Fixed custom memory allocation support for timers
1184 ([@https://svn.boost.org/trac/boost/ticket/3107 #3107]).
1185 * Tidied up various warnings reported by g++
1186 ([@https://svn.boost.org/trac/boost/ticket/1341 #1341],
1187 [@https://svn.boost.org/trac/boost/ticket/2618 #2618]).
1188 * Various documentation improvements, including more obvious hyperlinks to
1189 function overloads, header file information, examples for the handler type
1190 requirements, and adding enum values to the index
1191 ([@https://svn.boost.org/trac/boost/ticket/3157 #3157],
1192 [@https://svn.boost.org/trac/boost/ticket/2620 #2620]).
1194 [heading Asio 1.4.2 / Boost 1.39]
1196 * Implement automatic resizing of the bucket array in the internal hash maps.
1197 This is to improve performance for very large numbers of asynchronous
1198 operations and also to reduce memory usage for very small numbers. A new
1199 macro `BOOST_ASIO_HASH_MAP_BUCKETS` may be used to tweak the sizes used for
1200 the bucket arrays. (N.B. this feature introduced a bug which was fixed in
1201 Asio 1.4.3 / Boost 1.40.)
1202 * Add performance optimisation for the Windows IOCP backend for when no timers
1204 * Prevent locale settings from affecting formatting of TCP and UDP endpoints
1205 ([@https://svn.boost.org/trac/boost/ticket/2682 #2682]).
1206 * Fix a memory leak that occurred when an asynchronous SSL operation's
1207 completion handler threw an exception
1208 ([@https://svn.boost.org/trac/boost/ticket/2910 #2910]).
1209 * Fix the implementation of `io_control()` so that it adheres to the
1210 documented type requirements for IoControlCommand
1211 ([@https://svn.boost.org/trac/boost/ticket/2820 #2820]).
1212 * Fix incompatibility between Asio and ncurses.h
1213 ([@https://svn.boost.org/trac/boost/ticket/2156 #2156]).
1214 * On Windows, specifically handle the case when an overlapped `ReadFile` call
1215 fails with `ERROR_MORE_DATA`. This enables a hack where a
1216 `windows::stream_handle` can be used with a message-oriented named pipe
1217 ([@https://svn.boost.org/trac/boost/ticket/2936 #2936]).
1218 * Fix system call wrappers to always clear the error on success, as POSIX
1219 allows successful system calls to modify errno
1220 ([@https://svn.boost.org/trac/boost/ticket/2953 #2953]).
1221 * Don't include termios.h if `BOOST_ASIO_DISABLE_SERIAL_PORT` is defined
1222 ([@https://svn.boost.org/trac/boost/ticket/2917 #2917]).
1223 * Cleaned up some more MSVC level 4 warnings
1224 ([@https://svn.boost.org/trac/boost/ticket/2828 #2828]).
1225 * Various documentation fixes
1226 ([@https://svn.boost.org/trac/boost/ticket/2871 #2871]).
1228 [heading Asio 1.4.1 / Boost 1.38]
1230 * Improved compatibility with some Windows firewall software.
1231 * Ensured arguments to `windows::overlapped_ptr::complete()` are correctly
1232 passed to the completion handler
1233 ([@https://svn.boost.org/trac/boost/ticket/2614 #2614]).
1234 * Fixed a link problem and multicast failure on QNX
1235 ([@https://svn.boost.org/trac/boost/ticket/2504 #2504],
1236 [@https://svn.boost.org/trac/boost/ticket/2530 #2530]).
1237 * Fixed a compile error in SSL support on MinGW / g++ 3.4.5.
1238 * Drop back to using a pipe for notification if eventfd is not available at
1239 runtime on Linux ([@https://svn.boost.org/trac/boost/ticket/2683 #2683]).
1240 * Various minor bug and documentation fixes
1241 ([@https://svn.boost.org/trac/boost/ticket/2534 #2534],
1242 [@https://svn.boost.org/trac/boost/ticket/2541 #2541],
1243 [@https://svn.boost.org/trac/boost/ticket/2607 #2607],
1244 [@https://svn.boost.org/trac/boost/ticket/2617 #2617],
1245 [@https://svn.boost.org/trac/boost/ticket/2619 #2619]).
1247 [heading Asio 1.4.0 / Boost 1.37]
1249 * Enhanced CompletionCondition concept with the signature
1250 `size_t CompletionCondition(error_code ec, size_t total)`, where the return
1251 value indicates the maximum number of bytes to be transferred on the next
1252 read or write operation. (The old CompletionCondition signature is still
1253 supported for backwards compatibility).
1254 * New windows::overlapped_ptr class to allow arbitrary overlapped I/O
1255 functions (such as TransmitFile) to be used with Asio.
1256 * On recent versions of Linux, an eventfd descriptor is now used (rather than
1257 a pipe) to interrupt a blocked select/epoll reactor.
1258 * Added const overloads of lowest_layer().
1259 * Synchronous read, write, accept and connect operations are now thread safe
1260 (meaning that it is now permitted to perform concurrent synchronous
1261 operations on an individual socket, if supported by the OS).
1262 * Reactor-based io_service implementations now use lazy initialisation to
1263 reduce the memory usage of an io_service object used only as a message
1266 [heading Asio 1.2.0 / Boost 1.36]
1268 * Added support for serial ports.
1269 * Added support for UNIX domain sockets.
1270 * Added support for raw sockets and ICMP.
1271 * Added wrappers for POSIX stream-oriented file descriptors (excluding regular
1273 * Added wrappers for Windows stream-oriented `HANDLE`s such as named pipes
1274 (requires `HANDLE`s that work with I/O completion ports).
1275 * Added wrappers for Windows random-access `HANDLE`s such as files (requires
1276 `HANDLE`s that work with I/O completion ports).
1277 * Added support for reactor-style operations (i.e. they report readiness but
1278 perform no I/O) using a new `null_buffers` type.
1279 * Added an iterator type for bytewise traversal of buffer sequences.
1280 * Added new `read_until()` and `async_read_until()` overloads that take a
1281 user-defined function object for locating message boundaries.
1282 * Added an experimental two-lock queue (enabled by defining
1283 `BOOST_ASIO_ENABLE_TWO_LOCK_QUEUE`) that may provide better `io_service`
1284 scalability across many processors.
1285 * Various fixes, performance improvements, and more complete coverage of the
1286 custom memory allocation support.
1288 [heading Asio 1.0.0 / Boost 1.35]
1290 First release of Asio as part of Boost.