summaryrefslogtreecommitdiff
path: root/boost/beast/websocket/rfc6455.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/beast/websocket/rfc6455.hpp')
-rw-r--r--boost/beast/websocket/rfc6455.hpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/boost/beast/websocket/rfc6455.hpp b/boost/beast/websocket/rfc6455.hpp
index 921f896351..c3f012699d 100644
--- a/boost/beast/websocket/rfc6455.hpp
+++ b/boost/beast/websocket/rfc6455.hpp
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
+// 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)
@@ -13,7 +13,9 @@
#include <boost/beast/core/detail/config.hpp>
#include <boost/beast/core/static_string.hpp>
#include <boost/beast/core/string.hpp>
+#include <boost/beast/http/empty_body.hpp>
#include <boost/beast/http/message.hpp>
+#include <boost/beast/http/string_body.hpp>
#include <array>
#include <cstdint>
@@ -21,6 +23,12 @@ namespace boost {
namespace beast {
namespace websocket {
+/// The type of object holding HTTP Upgrade requests
+using request_type = http::request<http::empty_body>;
+
+/// The type of object holding HTTP Upgrade responses
+using response_type = http::response<http::string_body>;
+
/** Returns `true` if the specified HTTP request is a WebSocket Upgrade.
This function returns `true` when the passed HTTP Request
@@ -36,7 +44,7 @@ namespace websocket {
@par Example
@code
- void handle_connection(boost::asio::ip::tcp::socket& sock)
+ void handle_connection(net::ip::tcp::socket& sock)
{
boost::beast::flat_buffer buffer;
boost::beast::http::request<boost::beast::http::string_body> req;
@@ -210,6 +218,6 @@ struct close_reason
} // beast
} // boost
-#include <boost/beast/websocket/impl/rfc6455.ipp>
+#include <boost/beast/websocket/impl/rfc6455.hpp>
#endif