| 1 | // |
|---|---|
| 2 | // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) |
| 3 | // |
| 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 6 | // |
| 7 | // Official repository: https://github.com/boostorg/beast |
| 8 | // |
| 9 | |
| 10 | // This header file is designed to be included multiple times |
| 11 | // inside of function bodies holding documentation snippets. |
| 12 | |
| 13 | using namespace boost::beast; |
| 14 | namespace net = boost::asio; |
| 15 | namespace ssl = boost::asio::ssl; |
| 16 | using tcp = net::ip::tcp; |
| 17 | |
| 18 | error_code ec; |
| 19 | net::io_context ioc; |
| 20 | net::any_io_executor work = |
| 21 | net::require( |
| 22 | ioc.get_executor(), |
| 23 | net::execution::outstanding_work.tracked); |
| 24 | std::thread t{[&](){ ioc.run(); }}; |
| 25 | |
| 26 | tcp::socket sock(ioc); |
| 27 | |
| 28 | ssl::context ctx(ssl::context::tlsv12); |
| 29 | |
| 30 | boost::ignore_unused(ec); |
| 31 |
