| 162 | } |
| 163 | |
| 164 | void |
| 165 | on_read( |
| 166 | beast::error_code ec, |
| 167 | std::size_t bytes_transferred) |
| 168 | { |
| 169 | boost::ignore_unused(bytes_transferred); |
| 170 | |
| 171 | if(ec) |
| 172 | return fail(ec, "read"); |
| 173 | |
| 174 | // Write the message to standard out |
| 175 | std::cout << res_ << std::endl; |
| 176 | |
| 177 | // Set a timeout on the operation |
| 178 | beast::get_lowest_layer(stream_).expires_after(std::chrono::seconds(30)); |
| 179 | |
| 180 | // Gracefully close the stream |
| 181 | stream_.async_shutdown( |
| 182 | beast::bind_front_handler( |
| 183 | &session::on_shutdown, |
| 184 | shared_from_this())); |
| 185 | } |
| 186 | |
| 187 | void |
| 188 | on_shutdown(beast::error_code ec) |
nothing calls this directly
no test coverage detected