Boost logo

Boost :

Subject: [boost] [ASIO] Clarification regarding socket release on Windows
From: Gyorgy Szekely (hoditohod_at_[hidden])
Date: 2018-07-04 07:12:40

The documentation (boost 1.67) of asio::basic_stream_socket::release() has
the following remark:

*This function is unsupported on Windows versions prior to Windows 8.1, and
will fail with boost::asio::error::operation_not_supported on these

This is in accordance with the compiler warning I get when building my
project (from asio basic_socket.hpp), and the runtime behavior: the native
socket ownership is indeed retained by asio. For the IOCP backend!

If I add the BOOST_ASIO_DISABLE_IOCP define to the build I still get the
warning, but the release() appears to be working: the ownership is released
and I can do whatever I want with the socket.

My question: does the above comment apply only to the IOCP backend and I
can use release() with the reactive socket service? Or it just happens to
be working in my current setup but it's not guaranteed for others (or it
leaks resources, etc...)?


Boost list run by bdawes at, gregod at, cpdaniel at, john at