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

Method do_read_header

example/cpp11/chat/posix_chat_client.cpp:50–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 }
49
50 void do_read_header()
51 {
52 boost::asio::async_read(socket_,
53 boost::asio::buffer(read_msg_.data(), chat_message::header_length),
54 [this](boost::system::error_code ec, std::size_t /*length*/)
55 {
56 if (!ec && read_msg_.decode_header())
57 {
58 do_read_body();
59 }
60 else
61 {
62 close();
63 }
64 });
65 }
66
67 void do_read_body()
68 {

Callers

nothing calls this directly

Calls 5

async_readFunction · 0.85
bufferFunction · 0.85
decode_headerMethod · 0.80
closeFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected