Continuous boost::asio reads
问题 I'm experimenting with Boost::asio, and I'm trying to make a client that reads and outputs to console packets sent from a server. The server uses a proprietary protolcol. It sends a timer update every second, responds to ping, and can reply with a list of files when the client asks for it. I have a decent grasp of asynchronous networking, but I'm having a problem. Here's the code: class JReader { public: JReader(boost::asio::io_service &io_s) : socket_(io_s) { tcp::resolver resolver(io_s);