asio Changelog

What's new in asio 1.10.6

Mar 24, 2015
  • Ensured errors generated by Windows' ConnectEx function are mapped to their portable equivalents.
  • Added new macro (BOOST_)ASIO_DISABLE_CONNECTEX to allow use of ConnectEx to be explicitly disabled.
  • Fixed a race condition in windows::object_handle when there are pending wait operations on destruction.
  • Fixed IPv6 address parsing on FreeBSD, where a trailing scope ID would cause conversion to fail with EINVAL.
  • Worked around shared library visibility issues by ensuring Asio types use default visibility.
  • Changed the SSL wrapper to call the password callback when loading an in-memory key.
  • Fixed false SSL error reports by ensuring that the SSL error queue is cleared prior to each operation.
  • Fixed an ssl::stream bug that may result in spurious 'short read' errors.
  • Removed a redundant null pointer check in the SSL engine.
  • Added options for disabling TLS v1.1 and v1.2.
  • Removed use of deprecated OpenSSL function ERR_remove_state.
  • Fixed detection of various C++11 features with Clang.
  • Fixed detection of C++11 std::addressof with g++.
  • Changed multicast test to treat certain join_group failures as non-fatal.
  • Decoupled Asio unit tests from Boost.Test.
  • Changed the tutorial to use std::endl to ensure output is flushed.
  • Fixed an unsigned integer overflow reported by Clang's integer sanitizer.
  • Added support for move-only return types when using a yield_context object with asynchronous operations.
  • Changed yield_context to allow reentrant calls to the completion handler from an initiating function.
  • Updated detection of Windows Runtime to work with latest Windows SDK.

New in asio 1.11.0 Dev (Feb 16, 2015)

  • Implemented changes to substantially reflect the Networking Library Proposal (N4370).
  • New Executor type requirements and classes to support an executor framework, including the execution_context base class, the executor_work class for tracking outstanding work, and the executor polymorphic wrapper. Free functions dispatch(), post() and defer() have been added and are used to submit function objects to executors.
  • Completion handlers now have an associated executor and associated allocator. The free function wrap() is used to associate an executor with a handler or other object. The handler hooks for allocation, invocation and continuation have been deprecated.
  • A system_executor class has been added as a default executor.
  • The io_service class is now derived from execution_context and implements the executor type requirements in its nested executor_type class. The member functions dispatch(), post(), defer() and wrap() have been deprecated. The io_service::work class has been deprecated.
  • The io_service member function reset() has been renamed to restart(). The old name is retained for backward compatibility but has been deprecated.
  • The make_service() function is now used to add a new service to an execution context such as an io_service. The add_service() function has been deprecated.
  • A new strand template has been added to allow strand functionality to be used with generic executor types.
  • I/O objects (such as sockets and timers) now provide access to their associated io_service via a context() member function. The get_io_service() member function is deprecated.
  • All asynchronous operations and executor operations now support move-only handlers. However, the deprecated io_service::post(), io_service::dispatch(), io_service::strand::post() and io_service::strand::dispatch() functions still require copyable handlers.
  • Waitable timer objects are now movable.
  • Waitable timers, socket iostreams and socket streambufs now provide an expiry() member function for obtaining the expiry time. The accessors expires_at() and expires_after() have been deprecated, though those names are retained for the mutating members.
  • The std::packaged_task class template is now supported as a completion handler. The initiating operation automatically returns the future associated with the task. The package() function has been added as a convenient factory for packaged tasks.
  • Sockets, socket acceptors and descriptors now provide wait() and async_wait() operations that may be used to wait for readiness. The null_buffers type has been deprecated.
  • The proposed error code enum classes are simulated using namespaces. Existing asio error codes now have a correspondence with the standard error conditions.
  • Conversion between IP address types, and conversion from string to address, is now supported via the address_cast(), make_address(), make_address_v4() and make_address_v6() free functions. The from_string(), to_v4(), to_v6() and v4_mapped() member functions have been deprecated.
  • A default-constructed ip::address now represents an invalid address value that is neither IPv4 nor IPv6.
  • New buffer() overloads that generate mutable buffers for non-const string objects.
  • Support for dynamic buffer sequences that automatically grow and shrink to accomodate data as it is read or written. This is a generic facility similar to the existing asio::streambuf class. This support includes:
  • New dynamic_string_buffer and dynamic_vector_buffer adapter classes that meet the DynamicBufferSequence type requirements.
  • New dynamic_buffer() factory functions for creating a dynamic buffer adapter for a vector or string.
  • New overloads for the read(), async_read(), write() and async_write(), read_until() and async_read_until() free functions that directly support dynamic buffer sequences.
  • Support for networks and address ranges. Thanks go to Oliver Kowalke for contributing to the design and providing the implementation on which this facility is based. The following new classes have been added:
  • address_iterator_v4 for iterating across IPv4 addresses
  • address_iterator_v6 for iterating across IPv6 addresses
  • address_range_v4 to represent a range of IPv4 addresses
  • address_range_v6 to represent a range of IPv6 addresses
  • network_v4 for manipulating IPv4 CIDR addresses, e.g. 1.2.3.0/24
  • network_v6 for manipulating IPv6 CIDR addresses, e.g. ffe0:/120
  • New convenience headers in that correspond to the headers in the proposal.
  • Added a new, executor-aware thread_pool class.
  • Changed spawn() to be executor-aware.
  • Added a new spawn() overload that takes only a function object.
  • Changed spawn() and yield_context to permit nested calls to the completion handler.
  • Removed previously deprecated functions.
  • Added options for disabling TLS v1.1 and v1.2.
  • Changed the SSL wrapper to call the password callback when loading an in-memory key.
  • Changed the tutorial to use std::endl to ensure output is flushed.
  • Fixed false SSL error reports by ensuring that the SSL error queue is cleared prior to each operation.
  • Fixed an ssl::stream bug that may result in spurious 'short read' errors.
  • Enabled perfect forwarding for the first ssl::stream constructor argument.
  • Added standalone Asio support for Clang when used with libstdc++ and C++11.
  • Fixed an unsigned integer overflow reported by Clang's integer sanitizer.
  • Added support for move-only return types when using a yield_context object with asynchronous operations.
  • Ensured errors generated by Windows' ConnectEx function are mapped to their portable equivalents.
  • Changed multicast test to treat certain join_group failures as non-fatal.

New in asio 1.10.2 (May 6, 2014)

  • Fixed asio::spawn() to work correctly with new Boost.Coroutine interface.
  • Ensured that incomplete asio::spawn() coroutines are correctly unwound when cleaned up by the io_service destructor.
  • Fixed delegation of continuation hook for handlers produced by io_service::wrap() and strand::wrap().
  • Changed the Windows I/O completion port backend to use ConnectEx, if available, for connection-oriented IP sockets.
  • Changed the io_service backend for non-Windows (and non-IOCP Windows) platforms to use a single condition variable per io_service instance. This addresses a potential race condition when run_one() is used from multiple threads.
  • Prevented integer overflow when computing timeouts based on some boost::chrono and std::chrono clocks.
  • Made further changes to EV_CLEAR handling in the kqueue backend, to address other cases where the close() system call may hang on Mac OS X.
  • Fixed infinite recursion in implementation of resolver_query_base::flags::operator~.
  • Made the select reactor more efficient on Windows for large numbers of sockets.
  • Fixed a Windows-specific type-aliasing issue reported by gcc.
  • Prevented execution of compile-time-only buffer test to avoid triggering an address sanitiser warning.
  • Disabled the GetQueuedCompletionStatus timeout workaround on recent versions of Windows.
  • Changed implementation for Windows Runtime to use FormatMessageW rather than FormatMessageA, as the Windows store does not permit the latter.
  • Added support for string-based scope IDs when using link-local multicast addresses.
  • Changed IPv6 multicast group join to use the address's scope ID as the interface, if an interface is not explicitly specified.
  • Fixed multicast test failure on Mac OS X and the BSDs by using a link-local multicast address.
  • Various minor documentation improvements.

New in asio 1.4.5 (May 13, 2010)

  • Improved performance.
  • Reduced compile times.
  • Reduced the size of generated code.
  • Extended the guarantee that background threads don't call user code to
  • all asynchronous operations.
  • Changed to use edge-triggered epoll on Linux.
  • Changed to use `timerfd` for dispatching timers on Linux, when
  • available.
  • Changed to use one-shot notifications with kqueue on Mac OS X and BSD
  • platforms.
  • Added a bitmask type `ip::resolver_query_base::flags` as per the TR2
  • proposal. This type prevents implicit conversion from `int` to
  • `flags`, allowing the compiler to catch cases where users incorrectly
  • pass a numeric port number as the service name.
  • Added `#define NOMINMAX` for all Windows compilers. Users can define
  • `(BOOST_)ASIO_NO_NOMINMAX` to suppress this definition.
  • Fixed a bug where 0-byte asynchronous reads were incorrectly passing
  • an `error::eof` result to the completion handler.
  • Changed the `io_control()` member functions to always call `ioctl` on
  • the underlying descriptor when modifying blocking mode.
  • Changed the resolver implementation so that it no longer requires the
  • typedefs `InternetProtocol::resolver_query` and
  • `InternetProtocol::resolver_iterator`, as neither typedef is part of
  • the documented `InternetProtocol` requirements. The corresponding
  • typedefs in the `ip::tcp`, `ip::udp` and `ip::icmp` classes have been
  • deprecated.
  • Fixed out-of-band handling for reactors not based on `select()`.
  • Added new `(BOOST_)ASIO_DISABLE_THREADS` macro that allows Asio's
  • threading support to be independently disabled.
  • Minor documentation improvements.

New in asio 1.4.4 (May 12, 2010)

  • Added a new HTTP Server 4 example illustrating the use of stackless
  • coroutines with Asio.
  • Changed handler allocation and invocation to use `boost::addressof` to
  • get the address of handler objects, rather than applying `operator&`
  • directly.
  • Restricted MSVC buffer debugging workaround to 2008, as it causes a
  • crash with 2010 beta 2.
  • Fixed a problem with the lifetime of handler memory, where Windows
  • needs the `OVERLAPPED` structure to be valid until both the initiating
  • function call has returned and the completion packet has been
  • delivered.
  • Don't block signals while performing system calls, but instead restart
  • the calls if they are interrupted.
  • Documented the guarantee made by strand objects with respect to order
  • of handler invocation.
  • Changed strands to use a pool of implementations, to make copying of
  • strands cheaper.
  • Ensured that kqueue support is enabled for BSD platforms.
  • Added a `boost_` prefix to the `extern "C"` thread entry point
  • function.
  • In `getaddrinfo` emulation, only check the socket type (`SOCK_STREAM`
  • or `SOCK_DGRAM`) if a service name has been specified. This should
  • allow the emulation to work with raw sockets.
  • Added a workaround for some broken Windows firewalls that make a
  • socket appear bound to 0.0.0.0 when it is in fact bound to 127.0.0.1.
  • Applied a fix for reported excessive CPU usage under Solaris.
  • Added some support for platforms that use older compilers such as g++
  • 2.95.

New in asio 1.3.1 (Oct 27, 2008)

  • Lazy initialisation of the io_service reactor task. On platforms that use a reactor-based io_service (i.e. all POSIX platforms and Windows when I/O completion ports are disabled), the reactor is now lazily initialised when the first socket, timer or descriptor is created on the io_sevice. This change significantly reduces the memory usage of an io_service that is used purely as a message queue.
  • Bounds checking in ip::address_v4 and ip::address_v6. The address classes now perform boundary checking of integer arguments as per the TR2 networking proposal.
  • Fixed an infinite recursion in synchronous SSL handshaking.
  • Fixed a memory leak cause by the prior change to allow globally scoped io_service objects in dynamically loaded libraries on Windows. Such applications must now call: asio::detail::thread::set_terminate_threads(true); prior to the DLL being unloaded, to prevent deadlock in DllMain.
  • Ensured the streambuf's egptr() (the end of the get area) is kept synchronised with changes to pptr() (the start of the put area).
  • Reduced data copying when a streambuf's internal buffer is resized or its contents are moved.
  • Made service typeids work across shared library boundaries when the default gcc linker visibility is set to hidden.
  • Fixed basic_socket_streambuf and basic_socket_iostream to work with Protocol objects that do not provide a resolver.