MCPcopy Create free account
hub / github.com/boostorg/beast / on_request_impl

Function on_request_impl

include/boost/beast/http/parser.hpp:387–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385 parser(Arg1&& arg1, std::false_type, ArgN&&... argn);
386
387 void
388 on_request_impl(
389 verb method,
390 string_view method_str,
391 string_view target,
392 int version,
393 error_code& ec,
394 std::true_type)
395 {
396 // If this assert goes off, it means you tried to re-use a
397 // parser after it was done reading a message. This is not
398 // allowed, you need to create a new parser for each message.
399 // The easiest way to do that is to store the parser in
400 // an optional object.
401
402 BOOST_ASSERT(! used_);
403 if(used_)
404 {
405 BOOST_BEAST_ASSIGN_EC(ec, error::stale_parser);
406 return;
407 }
408 used_ = true;
409
410 m_.target(target);
411 if(method != verb::unknown)
412 m_.method(method);
413 else
414 m_.method_string(method_str);
415 m_.version(version);
416 }
417
418 void
419 on_request_impl(

Callers

nothing calls this directly

Calls 4

targetMethod · 0.80
methodMethod · 0.80
versionMethod · 0.45
on_request_implMethod · 0.45

Tested by

no test coverage detected