Repeated std::move on an boost::asio socket object in C++11

As documented in tcp::socket reference:

Following the move, the moved-from object is in the same state as if
constructed using the basic_stream_socket(io_service&) constructor.

The above means that you can move the original socket object from server to session as many times as you need.

Leave a Comment