Simple server using Boost.Asio throws an exception
问题 I am trying to write a simple server using Boost.Asio library. I want my server to receive a message from the client and print that message on the console. Here is the code of my server program: #include <iostream> #include <string> #include <memory> #include <boost/asio.hpp> using namespace boost::asio; using namespace boost::system; using boost::asio::ip::tcp; class Session : public std::enable_shared_from_this<Session> { public: Session(tcp::socket socket); void start(); private: tcp: