]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/beast/test/beast/websocket/ssl.cpp
2 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
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)
7 // Official repository: https://github.com/boostorg/beast
10 // VFALCO This causes a compilation error
11 #include <boost/beast/websocket/stream.hpp>
13 // Test that header file is self-contained.
14 #include <boost/beast/websocket/ssl.hpp>
16 #include <boost/beast/websocket/stream.hpp>
17 #include <boost/beast/_experimental/unit_test/suite.hpp>
18 #include <boost/asio/executor.hpp>
19 #include <boost/asio/ip/tcp.hpp>
20 #include <boost/asio/ssl.hpp>
26 class ssl_test
: public unit_test::suite
29 template<class Socket
>
34 net::ssl::context
ctx(net::ssl::context::tlsv12
);
40 operator()(error_code
)
45 websocket::stream
<Socket
> ws(ioc
, ctx
);
47 BEAST_EXPECT(static_cast<
48 void(websocket::stream
<Socket
>::*)(
49 close_reason
const&)>(
50 &websocket::stream
<Socket
>::close
));
52 BEAST_EXPECT(static_cast<
53 void(websocket::stream
<Socket
>::*)(
54 close_reason
const&, error_code
&)>(
55 &websocket::stream
<Socket
>::close
));
62 boost::asio::ssl::stream
<
63 boost::asio::basic_stream_socket
<
65 boost::asio::executor
>>>();
70 BEAST_DEFINE_TESTSUITE(beast
,websocket
,ssl
);