Files

30 lines
837 B
C++
Raw Permalink Normal View History

//
2019-02-21 07:00:31 -08:00
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//
// This header file is designed to be included multiple times
// inside of function bodies holding documentation snippets.
using namespace boost::beast;
namespace net = boost::asio;
namespace ssl = boost::asio::ssl;
using tcp = net::ip::tcp;
error_code ec;
net::io_context ioc;
2020-07-04 07:33:22 +02:00
net::any_io_executor work =
2020-07-04 08:22:39 +02:00
net::require(
2020-06-25 16:03:59 +02:00
ioc.get_executor(),
2020-07-04 07:33:22 +02:00
net::execution::outstanding_work.tracked);
std::thread t{[&](){ ioc.run(); }};
tcp::socket sock(ioc);
2019-03-14 17:40:41 +01:00
ssl::context ctx(ssl::context::tlsv12);
2019-10-04 18:56:06 -07:00
boost::ignore_unused(ec);