forked from boostorg/beast
Provide websocket::stream accept() overloads (API Change):
This adds enough functions to the accept and async_accept overload set to cover all combinations of request, buffers, and error_code parameters. This also fixes a defect where providing a complete Upgrade request when there are additional unprocessed octets remaining in the callers stream buffer could not be furnished to the WebSocket implementation.
This commit is contained in:
@@ -36,7 +36,6 @@ class stream<NextLayer>::response_op
|
||||
bool cont;
|
||||
stream<NextLayer>& ws;
|
||||
http::response_header res;
|
||||
error_code final_ec;
|
||||
int state = 0;
|
||||
|
||||
template<class Fields>
|
||||
@@ -47,11 +46,22 @@ class stream<NextLayer>::response_op
|
||||
, ws(ws_)
|
||||
, res(ws_.build_response(req))
|
||||
{
|
||||
// can't call stream::reset() here
|
||||
// otherwise accept_op will malfunction
|
||||
//
|
||||
if(res.status != 101)
|
||||
final_ec = error::handshake_failed;
|
||||
}
|
||||
|
||||
template<class Fields, class Buffers>
|
||||
data(Handler&, stream<NextLayer>& ws_,
|
||||
http::header<true, Fields> const& req,
|
||||
Buffers const& buffers, bool cont_)
|
||||
: cont(cont_)
|
||||
, ws(ws_)
|
||||
, res(ws_.build_response(req))
|
||||
{
|
||||
using boost::asio::buffer_copy;
|
||||
using boost::asio::buffer_size;
|
||||
// VFALCO What about catch(std::length_error const&)?
|
||||
ws.stream_.buffer().commit(buffer_copy(
|
||||
ws.stream_.buffer().prepare(
|
||||
buffer_size(buffers)), buffers));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -126,7 +136,8 @@ operator()(error_code ec, bool again)
|
||||
// sent response
|
||||
case 1:
|
||||
d.state = 99;
|
||||
ec = d.final_ec;
|
||||
if(d.res.status != 101)
|
||||
ec = error::handshake_failed;
|
||||
if(! ec)
|
||||
{
|
||||
pmd_read(
|
||||
@@ -154,6 +165,10 @@ class stream<NextLayer>::accept_op
|
||||
http::header_parser<true, http::fields> p;
|
||||
int state = 0;
|
||||
|
||||
// VFALCO These lines are formatted to work around a codecov defect
|
||||
data(Handler& handler, stream<NextLayer>& ws_) : cont(beast_asio_helpers::is_continuation(handler))
|
||||
, ws(ws_) {}
|
||||
|
||||
template<class Buffers>
|
||||
data(Handler& handler, stream<NextLayer>& ws_,
|
||||
Buffers const& buffers)
|
||||
@@ -163,7 +178,7 @@ class stream<NextLayer>::accept_op
|
||||
{
|
||||
using boost::asio::buffer_copy;
|
||||
using boost::asio::buffer_size;
|
||||
ws.reset();
|
||||
// VFALCO What about catch(std::length_error const&)?
|
||||
ws.stream_.buffer().commit(buffer_copy(
|
||||
ws.stream_.buffer().prepare(
|
||||
buffer_size(buffers)), buffers));
|
||||
@@ -185,11 +200,6 @@ public:
|
||||
(*this)(error_code{}, 0, false);
|
||||
}
|
||||
|
||||
void operator()(error_code const& ec)
|
||||
{
|
||||
(*this)(ec, 0);
|
||||
}
|
||||
|
||||
void operator()(error_code ec,
|
||||
std::size_t bytes_used, bool again = true);
|
||||
|
||||
@@ -264,59 +274,7 @@ upcall:
|
||||
d_.invoke(ec);
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class AcceptHandler>
|
||||
typename async_completion<
|
||||
AcceptHandler, void(error_code)>::result_type
|
||||
stream<NextLayer>::
|
||||
async_accept(AcceptHandler&& handler)
|
||||
{
|
||||
static_assert(is_AsyncStream<next_layer_type>::value,
|
||||
"AsyncStream requirements requirements not met");
|
||||
return async_accept(boost::asio::null_buffers{},
|
||||
std::forward<AcceptHandler>(handler));
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class ConstBufferSequence, class AcceptHandler>
|
||||
typename async_completion<
|
||||
AcceptHandler, void(error_code)>::result_type
|
||||
stream<NextLayer>::
|
||||
async_accept(ConstBufferSequence const& bs, AcceptHandler&& handler)
|
||||
{
|
||||
static_assert(is_AsyncStream<next_layer_type>::value,
|
||||
"AsyncStream requirements requirements not met");
|
||||
static_assert(beast::is_ConstBufferSequence<
|
||||
ConstBufferSequence>::value,
|
||||
"ConstBufferSequence requirements not met");
|
||||
beast::async_completion<
|
||||
AcceptHandler, void(error_code)
|
||||
> completion{handler};
|
||||
accept_op<decltype(completion.handler)>{
|
||||
completion.handler, *this, bs};
|
||||
return completion.result.get();
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class Fields, class AcceptHandler>
|
||||
typename async_completion<
|
||||
AcceptHandler, void(error_code)>::result_type
|
||||
stream<NextLayer>::
|
||||
async_accept(http::header<true, Fields> const& req,
|
||||
AcceptHandler&& handler)
|
||||
{
|
||||
static_assert(is_AsyncStream<next_layer_type>::value,
|
||||
"AsyncStream requirements requirements not met");
|
||||
beast::async_completion<
|
||||
AcceptHandler, void(error_code)
|
||||
> completion{handler};
|
||||
reset();
|
||||
response_op<decltype(completion.handler)>{
|
||||
completion.handler, *this, req,
|
||||
beast_asio_helpers::
|
||||
is_continuation(completion.handler)};
|
||||
return completion.result.get();
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template<class NextLayer>
|
||||
void
|
||||
@@ -326,7 +284,7 @@ accept()
|
||||
static_assert(is_SyncStream<next_layer_type>::value,
|
||||
"SyncStream requirements not met");
|
||||
error_code ec;
|
||||
accept(boost::asio::null_buffers{}, ec);
|
||||
accept(ec);
|
||||
if(ec)
|
||||
throw system_error{ec};
|
||||
}
|
||||
@@ -338,7 +296,8 @@ accept(error_code& ec)
|
||||
{
|
||||
static_assert(is_SyncStream<next_layer_type>::value,
|
||||
"SyncStream requirements not met");
|
||||
accept(boost::asio::null_buffers{}, ec);
|
||||
reset();
|
||||
do_accept(ec);
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
@@ -366,35 +325,28 @@ accept(ConstBufferSequence const& buffers, error_code& ec)
|
||||
{
|
||||
static_assert(is_SyncStream<next_layer_type>::value,
|
||||
"SyncStream requirements not met");
|
||||
static_assert(beast::is_ConstBufferSequence<
|
||||
static_assert(is_ConstBufferSequence<
|
||||
ConstBufferSequence>::value,
|
||||
"ConstBufferSequence requirements not met");
|
||||
reset();
|
||||
using boost::asio::buffer_copy;
|
||||
using boost::asio::buffer_size;
|
||||
reset();
|
||||
stream_.buffer().commit(buffer_copy(
|
||||
stream_.buffer().prepare(
|
||||
buffer_size(buffers)), buffers));
|
||||
http::header_parser<true, http::fields> p;
|
||||
auto const bytes_used = http::read_some(
|
||||
next_layer(), stream_.buffer(), p, ec);
|
||||
if(ec)
|
||||
return;
|
||||
BOOST_ASSERT(p.got_header());
|
||||
stream_.buffer().consume(bytes_used);
|
||||
accept(p.get(), ec);
|
||||
do_accept(ec);
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class Fields>
|
||||
void
|
||||
stream<NextLayer>::
|
||||
accept(http::header<true, Fields> const& request)
|
||||
accept(http::header<true, Fields> const& req)
|
||||
{
|
||||
static_assert(is_SyncStream<next_layer_type>::value,
|
||||
"SyncStream requirements not met");
|
||||
error_code ec;
|
||||
accept(request, ec);
|
||||
accept(req, ec);
|
||||
if(ec)
|
||||
throw system_error{ec};
|
||||
}
|
||||
@@ -409,19 +361,134 @@ accept(http::header<true, Fields> const& req,
|
||||
static_assert(is_SyncStream<next_layer_type>::value,
|
||||
"SyncStream requirements not met");
|
||||
reset();
|
||||
auto const res = build_response(req);
|
||||
http::write(stream_, res, ec);
|
||||
do_accept(req, ec);
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class Fields, class ConstBufferSequence>
|
||||
void
|
||||
stream<NextLayer>::
|
||||
accept(
|
||||
http::header<true, Fields> const& req,
|
||||
ConstBufferSequence const& buffers)
|
||||
{
|
||||
static_assert(is_SyncStream<next_layer_type>::value,
|
||||
"SyncStream requirements not met");
|
||||
static_assert(is_ConstBufferSequence<
|
||||
ConstBufferSequence>::value,
|
||||
"ConstBufferSequence requirements not met");
|
||||
error_code ec;
|
||||
accept(req, buffers, ec);
|
||||
if(ec)
|
||||
return;
|
||||
if(res.status != 101)
|
||||
{
|
||||
ec = error::handshake_failed;
|
||||
// VFALCO TODO Respect keep alive setting, perform
|
||||
// teardown if Connection: close.
|
||||
return;
|
||||
}
|
||||
pmd_read(pmd_config_, req.fields);
|
||||
open(detail::role_type::server);
|
||||
throw system_error{ec};
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class Fields, class ConstBufferSequence>
|
||||
void
|
||||
stream<NextLayer>::
|
||||
accept(
|
||||
http::header<true, Fields> const& req,
|
||||
ConstBufferSequence const& buffers,
|
||||
error_code& ec)
|
||||
{
|
||||
static_assert(is_SyncStream<next_layer_type>::value,
|
||||
"SyncStream requirements not met");
|
||||
static_assert(is_ConstBufferSequence<
|
||||
ConstBufferSequence>::value,
|
||||
"ConstBufferSequence requirements not met");
|
||||
reset();
|
||||
using boost::asio::buffer_copy;
|
||||
using boost::asio::buffer_size;
|
||||
stream_.buffer().commit(buffer_copy(
|
||||
stream_.buffer().prepare(
|
||||
buffer_size(buffers)), buffers));
|
||||
do_accept(req, ec);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template<class NextLayer>
|
||||
template<class AcceptHandler>
|
||||
typename async_completion<AcceptHandler,
|
||||
void(error_code)>::result_type
|
||||
stream<NextLayer>::
|
||||
async_accept(AcceptHandler&& handler)
|
||||
{
|
||||
static_assert(is_AsyncStream<next_layer_type>::value,
|
||||
"AsyncStream requirements requirements not met");
|
||||
beast::async_completion<AcceptHandler,
|
||||
void(error_code)> completion{handler};
|
||||
reset();
|
||||
accept_op<decltype(completion.handler)>{
|
||||
completion.handler, *this};
|
||||
return completion.result.get();
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class ConstBufferSequence, class AcceptHandler>
|
||||
typename async_completion<AcceptHandler,
|
||||
void(error_code)>::result_type
|
||||
stream<NextLayer>::
|
||||
async_accept(ConstBufferSequence const& buffers,
|
||||
AcceptHandler&& handler)
|
||||
{
|
||||
static_assert(is_AsyncStream<next_layer_type>::value,
|
||||
"AsyncStream requirements requirements not met");
|
||||
static_assert(is_ConstBufferSequence<
|
||||
ConstBufferSequence>::value,
|
||||
"ConstBufferSequence requirements not met");
|
||||
beast::async_completion<AcceptHandler,
|
||||
void(error_code)> completion{handler};
|
||||
reset();
|
||||
accept_op<decltype(completion.handler)>{
|
||||
completion.handler, *this, buffers};
|
||||
return completion.result.get();
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class Fields, class AcceptHandler>
|
||||
typename async_completion<AcceptHandler,
|
||||
void(error_code)>::result_type
|
||||
stream<NextLayer>::
|
||||
async_accept(http::header<true, Fields> const& req,
|
||||
AcceptHandler&& handler)
|
||||
{
|
||||
static_assert(is_AsyncStream<next_layer_type>::value,
|
||||
"AsyncStream requirements requirements not met");
|
||||
beast::async_completion<AcceptHandler,
|
||||
void(error_code)> completion{handler};
|
||||
reset();
|
||||
response_op<decltype(completion.handler)>{
|
||||
completion.handler, *this, req,
|
||||
beast_asio_helpers::
|
||||
is_continuation(completion.handler)};
|
||||
return completion.result.get();
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class Fields,
|
||||
class ConstBufferSequence, class AcceptHandler>
|
||||
typename async_completion<AcceptHandler,
|
||||
void(error_code)>::result_type
|
||||
stream<NextLayer>::
|
||||
async_accept(http::header<true, Fields> const& req,
|
||||
ConstBufferSequence const& buffers,
|
||||
AcceptHandler&& handler)
|
||||
{
|
||||
static_assert(is_AsyncStream<next_layer_type>::value,
|
||||
"AsyncStream requirements requirements not met");
|
||||
static_assert(is_ConstBufferSequence<
|
||||
ConstBufferSequence>::value,
|
||||
"ConstBufferSequence requirements not met");
|
||||
beast::async_completion<AcceptHandler,
|
||||
void(error_code)> completion{handler};
|
||||
reset();
|
||||
response_op<decltype(completion.handler)>{
|
||||
completion.handler, *this, req, buffers,
|
||||
beast_asio_helpers::
|
||||
is_continuation(completion.handler)};
|
||||
return completion.result.get();
|
||||
}
|
||||
|
||||
} // websocket
|
||||
|
||||
@@ -82,6 +82,43 @@ reset()
|
||||
stream_.buffer().size());
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
void
|
||||
stream<NextLayer>::
|
||||
do_accept(error_code& ec)
|
||||
{
|
||||
http::header_parser<true, http::fields> p;
|
||||
auto const bytes_used = http::read_some(
|
||||
next_layer(), stream_.buffer(), p, ec);
|
||||
if(ec)
|
||||
return;
|
||||
BOOST_ASSERT(p.got_header());
|
||||
stream_.buffer().consume(bytes_used);
|
||||
do_accept(p.get(), ec);
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class Fields>
|
||||
void
|
||||
stream<NextLayer>::
|
||||
do_accept(http::header<true, Fields> const& req,
|
||||
error_code& ec)
|
||||
{
|
||||
auto const res = build_response(req);
|
||||
http::write(stream_, res, ec);
|
||||
if(ec)
|
||||
return;
|
||||
if(res.status != 101)
|
||||
{
|
||||
ec = error::handshake_failed;
|
||||
// VFALCO TODO Respect keep alive setting, perform
|
||||
// teardown if Connection: close.
|
||||
return;
|
||||
}
|
||||
pmd_read(pmd_config_, req.fields);
|
||||
open(detail::role_type::server);
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
http::request_header
|
||||
stream<NextLayer>::
|
||||
|
||||
+383
-231
@@ -13,14 +13,15 @@
|
||||
#include <beast/websocket/detail/stream_base.hpp>
|
||||
#include <beast/http/message.hpp>
|
||||
#include <beast/http/string_body.hpp>
|
||||
#include <beast/core/dynabuf_readstream.hpp>
|
||||
#include <beast/core/async_completion.hpp>
|
||||
#include <beast/core/dynabuf_readstream.hpp>
|
||||
#include <beast/core/detail/get_lowest_layer.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/utility/string_ref.hpp>
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
namespace websocket {
|
||||
@@ -340,25 +341,25 @@ public:
|
||||
|
||||
/** Read and respond to a WebSocket HTTP Upgrade request.
|
||||
|
||||
This function is used to synchronously read a HTTP WebSocket
|
||||
Upgrade request and send the HTTP response. The call blocks until
|
||||
one of the following conditions is true:
|
||||
This function is used to synchronously read an HTTP WebSocket
|
||||
Upgrade request and send the HTTP response. The call blocks
|
||||
until one of the following conditions is true:
|
||||
|
||||
@li A HTTP request finishes receiving, and a HTTP response finishes
|
||||
sending.
|
||||
@li The HTTP request finishes receiving, and the HTTP response
|
||||
finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to the
|
||||
next layer's `read_some` and `write_some` functions.
|
||||
This function is implemented in terms of one or more calls to
|
||||
the next layer's `read_some` and `write_some` functions.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request, a
|
||||
HTTP response is sent back indicating a successful upgrade. When this
|
||||
call returns, the stream is then ready to send and receive WebSocket
|
||||
protocol frames and messages.
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When this call returns, the stream is then ready to send and
|
||||
receive WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied, a
|
||||
HTTP response is sent indicating the reason and status code
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@throws system_error Thrown on failure.
|
||||
@@ -368,25 +369,25 @@ public:
|
||||
|
||||
/** Read and respond to a WebSocket HTTP Upgrade request.
|
||||
|
||||
This function is used to synchronously read a HTTP WebSocket
|
||||
Upgrade request and send the HTTP response. The call blocks until
|
||||
one of the following conditions is true:
|
||||
This function is used to synchronously read an HTTP WebSocket
|
||||
Upgrade request and send the HTTP response. The call blocks
|
||||
until one of the following conditions is true:
|
||||
|
||||
@li A HTTP request finishes receiving, and a HTTP response finishes
|
||||
sending.
|
||||
@li The HTTP request finishes receiving, and the HTTP response
|
||||
finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to the
|
||||
next layer's `read_some` and `write_some` functions.
|
||||
This function is implemented in terms of one or more calls to
|
||||
the next layer's `read_some` and `write_some` functions.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request, a
|
||||
HTTP response is sent back indicating a successful upgrade. When this
|
||||
call returns, the stream is then ready to send and receive WebSocket
|
||||
protocol frames and messages.
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When this call returns, the stream is then ready to send and
|
||||
receive WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied, a
|
||||
HTTP response is sent indicating the reason and status code
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@param ec Set to indicate what error occurred, if any.
|
||||
@@ -394,36 +395,245 @@ public:
|
||||
void
|
||||
accept(error_code& ec);
|
||||
|
||||
/** Read and respond to a WebSocket HTTP Upgrade request.
|
||||
|
||||
This function is used to synchronously read an HTTP WebSocket
|
||||
Upgrade request and send the HTTP response. The call blocks
|
||||
until one of the following conditions is true:
|
||||
|
||||
@li The HTTP request finishes receiving, and the HTTP response
|
||||
finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to
|
||||
the next layer's `read_some` and `write_some` functions.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When this call returns, the stream is then ready to send and
|
||||
receive WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@param buffers Caller provided data that has already been
|
||||
received on the stream. The implementation will copy the
|
||||
caller provided data before the function returns.
|
||||
|
||||
@throws system_error Thrown on failure.
|
||||
*/
|
||||
template<class ConstBufferSequence>
|
||||
void
|
||||
accept(ConstBufferSequence const& buffers);
|
||||
|
||||
/** Read and respond to a WebSocket HTTP Upgrade request.
|
||||
|
||||
This function is used to synchronously read an HTTP WebSocket
|
||||
Upgrade request and send the HTTP response. The call blocks
|
||||
until one of the following conditions is true:
|
||||
|
||||
@li The HTTP request finishes receiving, and the HTTP response
|
||||
finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to
|
||||
the next layer's `read_some` and `write_some` functions.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When this call returns, the stream is then ready to send and
|
||||
receive WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@param buffers Caller provided data that has already been
|
||||
received on the stream. The implementation will copy the
|
||||
caller provided data before the function returns.
|
||||
|
||||
@param ec Set to indicate what error occurred, if any.
|
||||
*/
|
||||
template<class ConstBufferSequence>
|
||||
void
|
||||
accept(ConstBufferSequence const& buffers, error_code& ec);
|
||||
|
||||
/** Respond to a WebSocket HTTP Upgrade request
|
||||
|
||||
This function is used to synchronously send the HTTP response
|
||||
to an HTTP request possibly containing a WebSocket Upgrade.
|
||||
The call blocks until one of the following conditions is true:
|
||||
|
||||
@li The HTTP response finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to
|
||||
the next layer's `read_some` and `write_some` functions.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When this call returns, the stream is then ready to send and
|
||||
receive WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@param req An object containing the HTTP Upgrade request.
|
||||
Ownership is not transferred, the implementation will not
|
||||
access this object from other threads.
|
||||
|
||||
@throws system_error Thrown on failure.
|
||||
*/
|
||||
template<class Fields>
|
||||
void
|
||||
accept(http::header<true, Fields> const& req);
|
||||
|
||||
/** Respond to a WebSocket HTTP Upgrade request
|
||||
|
||||
This function is used to synchronously send the HTTP response
|
||||
to an HTTP request possibly containing a WebSocket Upgrade.
|
||||
The call blocks until one of the following conditions is true:
|
||||
|
||||
@li The HTTP response finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to
|
||||
the next layer's `read_some` and `write_some` functions.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When this call returns, the stream is then ready to send and
|
||||
receive WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@param req An object containing the HTTP Upgrade request.
|
||||
Ownership is not transferred, the implementation will not
|
||||
access this object from other threads.
|
||||
|
||||
@param ec Set to indicate what error occurred, if any.
|
||||
*/
|
||||
template<class Fields>
|
||||
void
|
||||
accept(http::header<true, Fields> const& req, error_code& ec);
|
||||
|
||||
/** Respond to a WebSocket HTTP Upgrade request
|
||||
|
||||
This function is used to synchronously send the HTTP response
|
||||
to an HTTP request possibly containing a WebSocket Upgrade.
|
||||
The call blocks until one of the following conditions is true:
|
||||
|
||||
@li The HTTP response finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to
|
||||
the next layer's `read_some` and `write_some` functions.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When this call returns, the stream is then ready to send and
|
||||
receive WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@param req An object containing the HTTP Upgrade request.
|
||||
Ownership is not transferred, the implementation will not
|
||||
access this object from other threads.
|
||||
|
||||
@param buffers Caller provided data that has already been
|
||||
received on the stream. This must not include the octets
|
||||
corresponding to the HTTP Upgrade request. The implementation
|
||||
will copy the caller provided data before the function returns.
|
||||
|
||||
@throws system_error Thrown on failure.
|
||||
*/
|
||||
template<class Fields, class ConstBufferSequence>
|
||||
void
|
||||
accept(http::header<true, Fields> const& req,
|
||||
ConstBufferSequence const& buffers);
|
||||
|
||||
/** Respond to a WebSocket HTTP Upgrade request
|
||||
|
||||
This function is used to synchronously send the HTTP response
|
||||
to an HTTP request possibly containing a WebSocket Upgrade.
|
||||
The call blocks until one of the following conditions is true:
|
||||
|
||||
@li The HTTP response finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to
|
||||
the next layer's `read_some` and `write_some` functions.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When this call returns, the stream is then ready to send and
|
||||
receive WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@param req An object containing the HTTP Upgrade request.
|
||||
Ownership is not transferred, the implementation will not
|
||||
access this object from other threads.
|
||||
|
||||
@param buffers Caller provided data that has already been
|
||||
received on the stream. This must not include the octets
|
||||
corresponding to the HTTP Upgrade request. The implementation
|
||||
will copy the caller provided data before the function returns.
|
||||
|
||||
@param ec Set to indicate what error occurred, if any.
|
||||
*/
|
||||
template<class Fields, class ConstBufferSequence>
|
||||
void
|
||||
accept(http::header<true, Fields> const& req,
|
||||
ConstBufferSequence const& buffers, error_code& ec);
|
||||
|
||||
/** Start reading and responding to a WebSocket HTTP Upgrade request.
|
||||
|
||||
This function is used to asynchronously read a HTTP WebSocket
|
||||
This function is used to asynchronously read an HTTP WebSocket
|
||||
Upgrade request and send the HTTP response. The function call
|
||||
always returns immediately. The asynchronous operation will
|
||||
continue until one of the following conditions is true:
|
||||
|
||||
@li A HTTP request finishes receiving, and a HTTP response finishes
|
||||
sending.
|
||||
@li The HTTP request finishes receiving, and the HTTP response
|
||||
finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This operation is implemented in terms of one or more calls to the
|
||||
next layer's `async_read_some` and `async_write_some` functions, and
|
||||
is known as a <em>composed operation</em>. The program must ensure
|
||||
that the stream performs no other operations until this operation
|
||||
completes.
|
||||
This operation is implemented in terms of one or more calls to
|
||||
the next layer's `async_read_some` and `async_write_some`
|
||||
functions, and is known as a <em>composed operation</em>. The
|
||||
program must ensure that the stream performs no other
|
||||
asynchronous operations until this operation completes.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request, a
|
||||
HTTP response is sent back indicating a successful upgrade. When
|
||||
this call returns, the stream is then ready to send and receive
|
||||
WebSocket protocol frames and messages.
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When the completion handler is invoked, the stream is then
|
||||
ready to send and receive WebSocket protocol frames and
|
||||
messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied, a
|
||||
HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure, and
|
||||
the completion handler will be invoked with a suitable error
|
||||
code set.
|
||||
|
||||
@param handler The handler to be called when the request completes.
|
||||
Copies will be made of the handler as required. The equivalent
|
||||
function signature of the handler must be:
|
||||
@param handler The handler to be called when the request
|
||||
completes. Copies will be made of the handler as required. The
|
||||
equivalent function signature of the handler must be:
|
||||
@code void handler(
|
||||
error_code const& error // result of operation
|
||||
); @endcode
|
||||
@@ -441,104 +651,35 @@ public:
|
||||
#endif
|
||||
async_accept(AcceptHandler&& handler);
|
||||
|
||||
/** Read and respond to a WebSocket HTTP Upgrade request.
|
||||
|
||||
This function is used to synchronously read a HTTP WebSocket
|
||||
Upgrade request and send the HTTP response. The call blocks until
|
||||
one of the following conditions is true:
|
||||
|
||||
@li A HTTP request finishes receiving, and a HTTP response finishes
|
||||
sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to the
|
||||
next layer's `read_some` and `write_some` functions.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request, a
|
||||
HTTP response is sent back indicating a successful upgrade. When
|
||||
this call returns, the stream is then ready to send and receive
|
||||
WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied, a
|
||||
HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@param buffers Caller provided data that has already been
|
||||
received on the stream. This may be used for implementations
|
||||
allowing multiple protocols on the same stream. The
|
||||
buffered data will first be applied to the handshake, and
|
||||
then to received WebSocket frames. The implementation will
|
||||
copy the caller provided data before the function returns.
|
||||
|
||||
@throws system_error Thrown on failure.
|
||||
*/
|
||||
template<class ConstBufferSequence>
|
||||
void
|
||||
accept(ConstBufferSequence const& buffers);
|
||||
|
||||
/** Read and respond to a WebSocket HTTP Upgrade request.
|
||||
|
||||
This function is used to synchronously read a HTTP WebSocket
|
||||
Upgrade request and send the HTTP response. The call blocks until
|
||||
one of the following conditions is true:
|
||||
|
||||
@li A HTTP request finishes receiving, and a HTTP response finishes
|
||||
sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to the
|
||||
next layer's `read_some` and `write_some` functions.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request, a
|
||||
HTTP response is sent back indicating a successful upgrade. When
|
||||
this call returns, the stream is then ready to send and receive
|
||||
WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied, a
|
||||
HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@param buffers Caller provided data that has already been
|
||||
received on the stream. This may be used for implementations
|
||||
allowing multiple protocols on the same stream. The
|
||||
buffered data will first be applied to the handshake, and
|
||||
then to received WebSocket frames. The implementation will
|
||||
copy the caller provided data before the function returns.
|
||||
|
||||
@param ec Set to indicate what error occurred, if any.
|
||||
*/
|
||||
template<class ConstBufferSequence>
|
||||
void
|
||||
accept(ConstBufferSequence const& buffers, error_code& ec);
|
||||
|
||||
/** Start reading and responding to a WebSocket HTTP Upgrade request.
|
||||
|
||||
This function is used to asynchronously read a HTTP WebSocket
|
||||
This function is used to asynchronously read an HTTP WebSocket
|
||||
Upgrade request and send the HTTP response. The function call
|
||||
always returns immediately. The asynchronous operation will
|
||||
continue until one of the following conditions is true:
|
||||
|
||||
@li A HTTP request finishes receiving, and a HTTP response finishes
|
||||
sending.
|
||||
@li The HTTP request finishes receiving, and the HTTP response
|
||||
finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This operation is implemented in terms of one or more calls to the
|
||||
next layer's `async_read_some` and `async_write_some` functions, and
|
||||
is known as a <em>composed operation</em>. The program must ensure
|
||||
that the stream performs no other operations until this operation
|
||||
completes.
|
||||
This operation is implemented in terms of one or more calls to
|
||||
the next layer's `async_read_some` and `async_write_some`
|
||||
functions, and is known as a <em>composed operation</em>. The
|
||||
program must ensure that the stream performs no other
|
||||
asynchronous operations until this operation completes.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request, a
|
||||
HTTP response is sent back indicating a successful upgrade. When
|
||||
this call returns, the stream is then ready to send and receive
|
||||
WebSocket protocol frames and messages.
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When the completion handler is invoked, the stream is then
|
||||
ready to send and receive WebSocket protocol frames and
|
||||
messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied, a
|
||||
HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure.
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure, and
|
||||
the completion handler will be invoked with a suitable error
|
||||
code set.
|
||||
|
||||
@param buffers Caller provided data that has already been
|
||||
received on the stream. This may be used for implementations
|
||||
@@ -547,9 +688,9 @@ public:
|
||||
then to received WebSocket frames. The implementation will
|
||||
copy the caller provided data before the function returns.
|
||||
|
||||
@param handler The handler to be called when the request completes.
|
||||
Copies will be made of the handler as required. The equivalent
|
||||
function signature of the handler must be:
|
||||
@param handler The handler to be called when the request
|
||||
completes. Copies will be made of the handler as required. The
|
||||
equivalent function signature of the handler must be:
|
||||
@code void handler(
|
||||
error_code const& error // result of operation
|
||||
); @endcode
|
||||
@@ -562,110 +703,49 @@ public:
|
||||
#if BEAST_DOXYGEN
|
||||
void_or_deduced
|
||||
#else
|
||||
typename async_completion<
|
||||
AcceptHandler, void(error_code)>::result_type
|
||||
typename async_completion<AcceptHandler,
|
||||
void(error_code)>::result_type
|
||||
#endif
|
||||
async_accept(ConstBufferSequence const& buffers,
|
||||
AcceptHandler&& handler);
|
||||
|
||||
/** Respond to a WebSocket HTTP Upgrade request
|
||||
|
||||
This function is used to synchronously send the HTTP response to
|
||||
a HTTP request possibly containing a WebSocket Upgrade request.
|
||||
The call blocks until one of the following conditions is true:
|
||||
|
||||
@li A HTTP response finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to the
|
||||
next layer's `write_some` functions.
|
||||
|
||||
If the passed HTTP request is a valid HTTP WebSocket Upgrade
|
||||
request, a HTTP response is sent back indicating a successful
|
||||
upgrade. When this call returns, the stream is then ready to send
|
||||
and receive WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP request is invalid or cannot be satisfied, a HTTP
|
||||
response is sent indicating the reason and status code (typically
|
||||
400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@param request An object containing the HTTP Upgrade request.
|
||||
Ownership is not transferred, the implementation will not access
|
||||
this object from other threads.
|
||||
|
||||
@throws system_error Thrown on failure.
|
||||
*/
|
||||
// VFALCO TODO This should also take a DynamicBuffer with any leftover bytes.
|
||||
template<class Fields>
|
||||
void
|
||||
accept(http::header<true, Fields> const& request);
|
||||
|
||||
/** Respond to a WebSocket HTTP Upgrade request
|
||||
|
||||
This function is used to synchronously send the HTTP response to
|
||||
a HTTP request possibly containing a WebSocket Upgrade request.
|
||||
The call blocks until one of the following conditions is true:
|
||||
|
||||
@li A HTTP response finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This function is implemented in terms of one or more calls to the
|
||||
next layer's `write_some` functions.
|
||||
|
||||
If the passed HTTP request is a valid HTTP WebSocket Upgrade
|
||||
request, a HTTP response is sent back indicating a successful
|
||||
upgrade. When this call returns, the stream is then ready to send
|
||||
and receive WebSocket protocol frames and messages.
|
||||
|
||||
If the HTTP request is invalid or cannot be satisfied, a HTTP
|
||||
response is sent indicating the reason and status code (typically
|
||||
400, "Bad Request"). This counts as a failure.
|
||||
|
||||
@param request An object containing the HTTP Upgrade request.
|
||||
Ownership is not transferred, the implementation will not access
|
||||
this object from other threads.
|
||||
|
||||
@param ec Set to indicate what error occurred, if any.
|
||||
*/
|
||||
template<class Fields>
|
||||
void
|
||||
accept(http::header<true, Fields> const& request, error_code& ec);
|
||||
|
||||
/** Start responding to a WebSocket HTTP Upgrade request.
|
||||
|
||||
This function is used to asynchronously send the HTTP response
|
||||
to a HTTP request possibly containing a WebSocket Upgrade request.
|
||||
The function call always returns immediately. The asynchronous
|
||||
operation will continue until one of the following conditions is
|
||||
true:
|
||||
to an HTTP request possibly containing a WebSocket Upgrade
|
||||
request. The function call always returns immediately. The
|
||||
asynchronous operation will continue until one of the following
|
||||
conditions is true:
|
||||
|
||||
@li A HTTP response finishes sending.
|
||||
@li The HTTP response finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This operation is implemented in terms of one or more calls to the
|
||||
next layer's `async_write_some` functions, and is known as a
|
||||
<em>composed operation</em>. The program must ensure that the
|
||||
stream performs no other operations until this operation completes.
|
||||
This operation is implemented in terms of one or more calls to
|
||||
the next layer's `async_write_some` functions, and is known as
|
||||
a <em>composed operation</em>. The program must ensure that the
|
||||
stream performs no other operations until this operation
|
||||
completes.
|
||||
|
||||
If the passed HTTP request is a valid HTTP WebSocket Upgrade
|
||||
request, a HTTP response is sent back indicating a successful
|
||||
upgrade. When this asynchronous operation completes, the stream is
|
||||
then ready to send and receive WebSocket protocol frames and messages.
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When the completion handler is invoked, the stream is then
|
||||
ready to send and receive WebSocket protocol frames and
|
||||
messages.
|
||||
|
||||
If the HTTP request is invalid or cannot be satisfied, a HTTP
|
||||
response is sent indicating the reason and status code (typically
|
||||
400, "Bad Request"). This counts as a failure.
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure, and
|
||||
the completion handler will be invoked with a suitable error
|
||||
code set.
|
||||
|
||||
@param request An object containing the HTTP Upgrade request.
|
||||
@param req An object containing the HTTP Upgrade request.
|
||||
Ownership is not transferred, the implementation will not access
|
||||
this object from other threads.
|
||||
|
||||
@param handler The handler to be called when the request completes.
|
||||
Copies will be made of the handler as required. The equivalent
|
||||
function signature of the handler must be:
|
||||
@param handler The handler to be called when the request
|
||||
completes. Copies will be made of the handler as required. The
|
||||
equivalent function signature of the handler must be:
|
||||
@code void handler(
|
||||
error_code const& error // result of operation
|
||||
); @endcode
|
||||
@@ -678,19 +758,83 @@ public:
|
||||
#if BEAST_DOXYGEN
|
||||
void_or_deduced
|
||||
#else
|
||||
typename async_completion<
|
||||
AcceptHandler, void(error_code)>::result_type
|
||||
typename async_completion<AcceptHandler,
|
||||
void(error_code)>::result_type
|
||||
#endif
|
||||
async_accept(http::header<true,
|
||||
Fields> const& request, AcceptHandler&& handler);
|
||||
async_accept(http::header<true, Fields> const& req,
|
||||
AcceptHandler&& handler);
|
||||
|
||||
/** Send a HTTP WebSocket Upgrade request and receive the response.
|
||||
/** Start responding to a WebSocket HTTP Upgrade request.
|
||||
|
||||
This function is used to asynchronously send the HTTP response
|
||||
to an HTTP request possibly containing a WebSocket Upgrade
|
||||
request. The function call always returns immediately. The
|
||||
asynchronous operation will continue until one of the following
|
||||
conditions is true:
|
||||
|
||||
@li The HTTP response finishes sending.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
|
||||
This operation is implemented in terms of one or more calls to
|
||||
the next layer's `async_write_some` functions, and is known as
|
||||
a <em>composed operation</em>. The program must ensure that the
|
||||
stream performs no other operations until this operation
|
||||
completes.
|
||||
|
||||
If the stream receives a valid HTTP WebSocket Upgrade request,
|
||||
an HTTP response is sent back indicating a successful upgrade.
|
||||
When the completion handler is invoked, the stream is then
|
||||
ready to send and receive WebSocket protocol frames and
|
||||
messages.
|
||||
|
||||
If the HTTP Upgrade request is invalid or cannot be satisfied,
|
||||
an HTTP response is sent indicating the reason and status code
|
||||
(typically 400, "Bad Request"). This counts as a failure, and
|
||||
the completion handler will be invoked with a suitable error
|
||||
code set.
|
||||
|
||||
@param req An object containing the HTTP Upgrade request.
|
||||
Ownership is not transferred, the implementation will not access
|
||||
this object from other threads.
|
||||
|
||||
@param buffers Caller provided data that has already been
|
||||
received on the stream. This may be used for implementations
|
||||
allowing multiple protocols on the same stream. The
|
||||
buffered data will first be applied to the handshake, and
|
||||
then to received WebSocket frames. The implementation will
|
||||
copy the caller provided data before the function returns.
|
||||
|
||||
@param handler The handler to be called when the request
|
||||
completes. Copies will be made of the handler as required. The
|
||||
equivalent function signature of the handler must be:
|
||||
@code void handler(
|
||||
error_code const& error // result of operation
|
||||
); @endcode
|
||||
Regardless of whether the asynchronous operation completes
|
||||
immediately or not, the handler will not be invoked from within
|
||||
this function. Invocation of the handler will be performed in a
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class Fields,
|
||||
class ConstBufferSequence, class AcceptHandler>
|
||||
#if BEAST_DOXYGEN
|
||||
void_or_deduced
|
||||
#else
|
||||
typename async_completion<AcceptHandler,
|
||||
void(error_code)>::result_type
|
||||
#endif
|
||||
async_accept(http::header<true, Fields> const& req,
|
||||
ConstBufferSequence const& buffers,
|
||||
AcceptHandler&& handler);
|
||||
|
||||
/** Send an HTTP WebSocket Upgrade request and receive the response.
|
||||
|
||||
This function is used to synchronously send the WebSocket
|
||||
upgrade HTTP request. The call blocks until one of the
|
||||
following conditions is true:
|
||||
|
||||
@li A HTTP request finishes sending and a HTTP response finishes
|
||||
@li A HTTP request finishes sending and an HTTP response finishes
|
||||
receiving.
|
||||
|
||||
@li An error occurs on the stream
|
||||
@@ -728,13 +872,13 @@ public:
|
||||
handshake(boost::string_ref const& host,
|
||||
boost::string_ref const& resource);
|
||||
|
||||
/** Send a HTTP WebSocket Upgrade request and receive the response.
|
||||
/** Send an HTTP WebSocket Upgrade request and receive the response.
|
||||
|
||||
This function is used to synchronously send the WebSocket
|
||||
upgrade HTTP request. The call blocks until one of the
|
||||
following conditions is true:
|
||||
|
||||
@li A HTTP request finishes sending and a HTTP response finishes
|
||||
@li A HTTP request finishes sending and an HTTP response finishes
|
||||
receiving.
|
||||
|
||||
@li An error occurs on the stream
|
||||
@@ -778,7 +922,7 @@ public:
|
||||
operation will continue until one of the following conditions is
|
||||
true:
|
||||
|
||||
@li A HTTP request finishes sending and a HTTP response finishes
|
||||
@li A HTTP request finishes sending and an HTTP response finishes
|
||||
receiving.
|
||||
|
||||
@li An error occurs on the stream.
|
||||
@@ -1673,6 +1817,14 @@ private:
|
||||
void
|
||||
reset();
|
||||
|
||||
void
|
||||
do_accept(error_code& ec);
|
||||
|
||||
template<class Fields>
|
||||
void
|
||||
do_accept(http::header<true, Fields> const& req,
|
||||
error_code& ec);
|
||||
|
||||
http::request_header
|
||||
build_request(boost::string_ref const& host,
|
||||
boost::string_ref const& resource,
|
||||
|
||||
Reference in New Issue
Block a user