c++ - Boost ASIO networking server/client
问题 I have written a program for client and server. The program currently does the following: Server listens to an end point for a connection Client connects to the server server sends message on accepting a connection client receives the message I'm doing this asynchronously. But, the problem is they can only send/receive one message. After that, they just terminate. Below is my code: #include <iostream> #include <vector> #include<boost/asio.hpp> std::vector<char> buff(256); void SendHandler