| 69 | } |
| 70 | |
| 71 | void connection::do_write() |
| 72 | { |
| 73 | auto self(shared_from_this()); |
| 74 | boost::asio::async_write(socket_, reply_.to_buffers(), |
| 75 | [this, self](boost::system::error_code ec, std::size_t) |
| 76 | { |
| 77 | if (!ec) |
| 78 | { |
| 79 | // Initiate graceful connection closure. |
| 80 | boost::system::error_code ignored_ec; |
| 81 | socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, |
| 82 | ignored_ec); |
| 83 | } |
| 84 | |
| 85 | if (ec != boost::asio::error::operation_aborted) |
| 86 | { |
| 87 | connection_manager_.stop(shared_from_this()); |
| 88 | } |
| 89 | }); |
| 90 | } |
| 91 | |
| 92 | } // namespace server |
| 93 | } // namespace http |
nothing calls this directly
no test coverage detected