| 180 | } |
| 181 | |
| 182 | void |
| 183 | on_close(beast::error_code ec) |
| 184 | { |
| 185 | if(ec) |
| 186 | return fail(ec, "close"); |
| 187 | |
| 188 | // If we get here then the connection is closed gracefully |
| 189 | |
| 190 | // The make_printable() function helps print a ConstBufferSequence |
| 191 | std::cout << beast::make_printable(buffer_.data()) << std::endl; |
| 192 | } |
| 193 | }; |
| 194 | |
| 195 | //------------------------------------------------------------------------------ |