Answer the question
In order to leave comments, you need to log in
Why is it not reading data from the client (sockets)?
problem code:
for(;;) {
ip::tcp::socket sock(io_context);
acceptor.accept(sock);
error_code ignored_error;
write(/*код вырезан*/);
std::cout << "yes!\n";
/*код вырезан*/++;
std::string buf;
error_code ec;
read(sock, buffer(buf, 16), ec);
std::cout << buf;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question