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
13using namespace boost::beast;
14namespace net = boost::asio;
15namespace ssl = boost::asio::ssl;
16using tcp = net::ip::tcp;
17
18error_code ec;
19net::io_context ioc;
20net::any_io_executor work =
21 net::require(
22 ioc.get_executor(),
23 net::execution::outstanding_work.tracked);
24std::thread t{[&](){ ioc.run(); }};
25
26tcp::socket sock(ioc);
27
28ssl::context ctx(ssl::context::tlsv12);
29
30boost::ignore_unused(ec);
31

source code of boost/libs/beast/test/doc/snippets.ipp