I know that concurrent calls of methods of the same socket object leads to undefined behaviour.
But what about calling an asynchronous operation and calling it again (non concurrently) before the completion handler of the first one is invoked?
Say, what is the expected behaviour of the following (if any):
boost::asio::ip::udp::socket socket;
// make socket join a multicast group, for instance
socket.async_receive( boost::asio::null_buffers( ) , & handler1 );
// assume handler1() is not called between this two lines
socket.async_receive( boost::asio::null_buffers( ) , & handler2 );
?
This seems something someone should not be doing, but I couldn't find in the docs any specific place where such an issue is addressed.