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

Method do_write_output

example/cpp11/chat/posix_chat_client.cpp:84–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 void do_write_output()
85 {
86 // Write out the message we just received, terminated by a newline.
87 static char eol[] = { '\n' };
88 std::array<boost::asio::const_buffer, 2> buffers = {{
89 boost::asio::buffer(read_msg_.body(), read_msg_.body_length()),
90 boost::asio::buffer(eol) }};
91 boost::asio::async_write(output_, buffers,
92 [this](boost::system::error_code ec, std::size_t /*length*/)
93 {
94 if (!ec)
95 {
96 do_read_header();
97 }
98 else
99 {
100 close();
101 }
102 });
103 }
104
105 void do_read_input()
106 {

Callers

nothing calls this directly

Calls 5

bufferFunction · 0.85
async_writeFunction · 0.85
bodyMethod · 0.80
body_lengthMethod · 0.80
closeFunction · 0.50

Tested by

no test coverage detected