MCPcopy Create free account
hub / github.com/boostorg/asio / do_read_body

Method do_read_body

example/cpp11/chat/chat_client.cpp:82–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 }
81
82 void do_read_body()
83 {
84 boost::asio::async_read(socket_,
85 boost::asio::buffer(read_msg_.body(), read_msg_.body_length()),
86 [this](boost::system::error_code ec, std::size_t /*length*/)
87 {
88 if (!ec)
89 {
90 std::cout.write(read_msg_.body(), read_msg_.body_length());
91 std::cout << "\n";
92 do_read_header();
93 }
94 else
95 {
96 socket_.close();
97 }
98 });
99 }
100
101 void do_write()
102 {

Callers

nothing calls this directly

Calls 6

async_readFunction · 0.85
bufferFunction · 0.85
bodyMethod · 0.80
body_lengthMethod · 0.80
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected