mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-03-17 00:00:03 +08:00
Squashed 'Sources/OpenVPNAdapter/Libraries/Vendors/asio/' changes from 90f32660cd..8d4c8c3ce4
8d4c8c3ce4 asio version 1.14.0 released 30336a0873 Revision history. 2a1f68845a On Windows, ensure global object destructors are run. 6f55aeecd0 Fix move-based async_accept between sockets with different executor types. c1c068c6ad The executor is copied, not moved, when the I/O object moves. 37c8d91d21 Add runtime detection of native I/O executors when using polymorphic wrapper. git-subtree-dir: Sources/OpenVPNAdapter/Libraries/Vendors/asio git-subtree-split: 8d4c8c3ce43c866f609d2eda9a43fe5b334620be
This commit is contained in:
@@ -729,6 +729,17 @@ struct move_accept_handler
|
||||
private:
|
||||
move_accept_handler(const move_accept_handler&) {}
|
||||
};
|
||||
|
||||
struct move_accept_ioc_handler
|
||||
{
|
||||
move_accept_ioc_handler() {}
|
||||
void operator()(const asio::error_code&,
|
||||
asio::basic_stream_socket<asio::ip::tcp,
|
||||
asio::io_context::executor_type>) {}
|
||||
move_accept_ioc_handler(move_accept_handler&&) {}
|
||||
private:
|
||||
move_accept_ioc_handler(const move_accept_handler&) {}
|
||||
};
|
||||
#endif // defined(ASIO_HAS_MOVE)
|
||||
|
||||
void test()
|
||||
@@ -913,8 +924,12 @@ void test()
|
||||
#if defined(ASIO_HAS_MOVE)
|
||||
acceptor1.async_accept(move_accept_handler());
|
||||
acceptor1.async_accept(ioc, move_accept_handler());
|
||||
acceptor1.async_accept(ioc_ex, move_accept_handler());
|
||||
acceptor1.async_accept(ioc_ex, move_accept_ioc_handler());
|
||||
acceptor1.async_accept(peer_endpoint, move_accept_handler());
|
||||
acceptor1.async_accept(ioc, peer_endpoint, move_accept_handler());
|
||||
acceptor1.async_accept(ioc_ex, peer_endpoint, move_accept_handler());
|
||||
acceptor1.async_accept(ioc_ex, peer_endpoint, move_accept_ioc_handler());
|
||||
#endif // defined(ASIO_HAS_MOVE)
|
||||
}
|
||||
catch (std::exception&)
|
||||
|
||||
Reference in New Issue
Block a user