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

Method do_read_body

example/cpp11/chat/chat_server.cpp:119–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117 }
118
119 void do_read_body()
120 {
121 auto self(shared_from_this());
122 boost::asio::async_read(socket_,
123 boost::asio::buffer(read_msg_.body(), read_msg_.body_length()),
124 [this, self](boost::system::error_code ec, std::size_t /*length*/)
125 {
126 if (!ec)
127 {
128 room_.deliver(read_msg_);
129 do_read_header();
130 }
131 else
132 {
133 room_.leave(shared_from_this());
134 }
135 });
136 }
137
138 void do_write()
139 {

Callers

nothing calls this directly

Calls 6

async_readFunction · 0.85
bufferFunction · 0.85
bodyMethod · 0.80
body_lengthMethod · 0.80
deliverMethod · 0.45
leaveMethod · 0.45

Tested by

no test coverage detected