V
V
vjufvufcgyf2020-11-30 16:40:47
C++ / C#
vjufvufcgyf, 2020-11-30 16:40:47

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 question

Ask a Question

731 491 924 answers to any question