Boost prep

This commit is contained in:
Vinnie Falco committed 2017-07-23 17:34:13 -07:00
1 parent 3777cb8b9c
commit 7139dd639a
375 files changed
+5253 -3884

No files matched your search

+12 -10
View File
@@ -4,9 +4,11 @@
// 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
//
#ifndef BEAST_EXAMPLE_SERVER_MULTI_PORT_HPP
#define BEAST_EXAMPLE_SERVER_MULTI_PORT_HPP
#ifndef BOOST_BEAST_EXAMPLE_SERVER_MULTI_PORT_HPP
#define BOOST_BEAST_EXAMPLE_SERVER_MULTI_PORT_HPP
#include "ws_async_port.hpp"
#include "http_async_port.hpp"
@@ -15,7 +17,7 @@
#include "../common/detect_ssl.hpp"
#include <beast/core.hpp>
#include <boost/beast/core.hpp>
#include <boost/function.hpp>
@@ -54,7 +56,7 @@ class multi_con
boost::asio::ssl::context& ctx_;
// Holds the data we read during ssl detection
beast::flat_static_buffer<6> buffer_;
boost::beast::flat_static_buffer<6> buffer_;
public:
// Constructor
@@ -181,7 +183,7 @@ private:
// not_connected happens under normal
// circumstances so don't bother reporting it.
//
if(ec && ec != beast::errc::not_connected)
if(ec && ec != boost::beast::errc::not_connected)
return this->fail("shutdown", ec);
}
};
@@ -213,8 +215,8 @@ protected:
// crash with gcc and clang using libstdc++
// The types of the on_stream callback
using on_new_stream_cb1 = boost::function<void(beast::websocket::stream<socket_type>&)>;
using on_new_stream_cb2 = boost::function<void(beast::websocket::stream<ssl_stream<socket_type>>&)>;
using on_new_stream_cb1 = boost::function<void(boost::beast::websocket::stream<socket_type>&)>;
using on_new_stream_cb2 = boost::function<void(boost::beast::websocket::stream<ssl_stream<socket_type>>&)>;
// Reference to the server instance that made us
server& instance_;
@@ -244,7 +246,7 @@ public:
should have this equivalent signature:
@code
template<class NextLayer>
void callback(beast::websocket::stream<NextLayer>&);
void callback(boost::beast::websocket::stream<NextLayer>&);
@endcode
In C++14 this can be accomplished with a generic lambda. In
C++11 it will be necessary to write out a lambda manually,
@@ -280,7 +282,7 @@ public:
on_upgrade(
socket_type&& sock,
endpoint_type ep,
beast::http::request<Body>&& req)
boost::beast::http::request<Body>&& req)
{
// Create the connection and call the version of
// run that takes the request since we have it already
@@ -311,7 +313,7 @@ public:
on_upgrade(
ssl_stream<socket_type>&& stream,
endpoint_type ep,
beast::http::request<Body>&& req)
boost::beast::http::request<Body>&& req)
{
std::make_shared<async_wss_con>(
std::move(stream),