mirror of
https://github.com/boostorg/beast.git
synced 2025-08-01 22:04:34 +02:00
@@ -8,6 +8,7 @@ HTTP
|
|||||||
* Make chunk_encode public
|
* Make chunk_encode public
|
||||||
* Add write, async_write, operator<< for message_headers
|
* Add write, async_write, operator<< for message_headers
|
||||||
* Add read, async_read for message_headers
|
* Add read, async_read for message_headers
|
||||||
|
* Fix with_body example
|
||||||
|
|
||||||
WebSocket
|
WebSocket
|
||||||
|
|
||||||
|
@@ -111,6 +111,9 @@ public:
|
|||||||
/** Construct the parser.
|
/** Construct the parser.
|
||||||
|
|
||||||
@param args Forwarded to the message constructor.
|
@param args Forwarded to the message constructor.
|
||||||
|
|
||||||
|
@note This function participates in overload resolution only
|
||||||
|
if the first argument is not a parser or headers parser.
|
||||||
*/
|
*/
|
||||||
#if GENERATING_DOCS
|
#if GENERATING_DOCS
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
@@ -118,8 +121,13 @@ public:
|
|||||||
parser_v1(Args&&... args);
|
parser_v1(Args&&... args);
|
||||||
#else
|
#else
|
||||||
template<class Arg1, class... ArgN,
|
template<class Arg1, class... ArgN,
|
||||||
class = typename std::enable_if<! std::is_same<
|
class = typename std::enable_if<
|
||||||
typename std::decay<Arg1>::type, parser_v1>::value>>
|
! std::is_same<typename
|
||||||
|
std::decay<Arg1>::type,
|
||||||
|
headers_parser_v1<isRequest, Headers>>::value &&
|
||||||
|
! std::is_same<typename
|
||||||
|
std::decay<Arg1>::type, parser_v1>::value
|
||||||
|
>::type>
|
||||||
explicit
|
explicit
|
||||||
parser_v1(Arg1&& arg1, ArgN&&... argn)
|
parser_v1(Arg1&& arg1, ArgN&&... argn)
|
||||||
: m_(std::forward<Arg1>(arg1),
|
: m_(std::forward<Arg1>(arg1),
|
||||||
@@ -135,7 +143,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
explicit
|
explicit
|
||||||
parser_v1(headers_parser_v1<isRequest, Headers>&& parser,
|
parser_v1(headers_parser_v1<isRequest, Headers>& parser,
|
||||||
Args&&... args)
|
Args&&... args)
|
||||||
: m_(parser.release(), std::forward<Args>(args)...)
|
: m_(parser.release(), std::forward<Args>(args)...)
|
||||||
{
|
{
|
||||||
@@ -309,7 +317,7 @@ private:
|
|||||||
@code
|
@code
|
||||||
headers_parser<true, headers> ph;
|
headers_parser<true, headers> ph;
|
||||||
...
|
...
|
||||||
auto p = with_body<string_body>(std::move(ph));
|
auto p = with_body<string_body>(ph);
|
||||||
...
|
...
|
||||||
message<true, string_body, headers> m = p.release();
|
message<true, string_body, headers> m = p.release();
|
||||||
@endcode
|
@endcode
|
||||||
@@ -320,7 +328,7 @@ with_body(headers_parser_v1<isRequest, Headers>& parser,
|
|||||||
Args&&... args)
|
Args&&... args)
|
||||||
{
|
{
|
||||||
return parser_v1<isRequest, Body, Headers>(
|
return parser_v1<isRequest, Body, Headers>(
|
||||||
std::move(parser), std::forward<Args>(args)...);
|
parser, std::forward<Args>(args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // http
|
} // http
|
||||||
|
Reference in New Issue
Block a user