CCF
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
http::Parser Class Referenceabstract

#include <http_parser.h>

Inherited by http::RequestParser, and http::ResponseParser.

Public Member Functions

void execute (const uint8_t *data, size_t size)
 
void append_body (const char *at, size_t length)
 
virtual void new_message ()
 
virtual void handle_completed_message ()=0
 
void end_message ()
 
void header_field (const char *at, size_t length)
 
void header_value (const char *at, size_t length)
 
void headers_complete ()
 

Protected Member Functions

void complete_header ()
 
 Parser (llhttp_type_t type, const ccf::http::ParserConfiguration &config=ccf::http::ParserConfiguration{})
 

Protected Attributes

llhttp_t parser
 
llhttp_settings_t settings
 
ccf::http::ParserConfiguration configuration
 
State state = DONE
 
std::vector< uint8_t > body_buf
 
ccf::http::HeaderMap headers
 
std::pair< std::string, std::string > partial_parsed_header = {}
 

Constructor & Destructor Documentation

◆ Parser()

http::Parser::Parser ( llhttp_type_t  type,
const ccf::http::ParserConfiguration config = ccf::http::ParserConfiguration{} 
)
inlineprotected

Member Function Documentation

◆ append_body()

void http::Parser::append_body ( const char *  at,
size_t  length 
)
inline

◆ complete_header()

void http::Parser::complete_header ( )
inlineprotected

◆ end_message()

void http::Parser::end_message ( )
inline

◆ execute()

void http::Parser::execute ( const uint8_t *  data,
size_t  size 
)
inline

◆ handle_completed_message()

virtual void http::Parser::handle_completed_message ( )
pure virtual

◆ header_field()

void http::Parser::header_field ( const char *  at,
size_t  length 
)
inline

◆ header_value()

void http::Parser::header_value ( const char *  at,
size_t  length 
)
inline

◆ headers_complete()

void http::Parser::headers_complete ( )
inline

◆ new_message()

virtual void http::Parser::new_message ( )
inlinevirtual

Reimplemented in http::RequestParser.

Member Data Documentation

◆ body_buf

std::vector<uint8_t> http::Parser::body_buf
protected

◆ configuration

ccf::http::ParserConfiguration http::Parser::configuration
protected

◆ headers

ccf::http::HeaderMap http::Parser::headers
protected

◆ parser

llhttp_t http::Parser::parser
protected

◆ partial_parsed_header

std::pair<std::string, std::string> http::Parser::partial_parsed_header = {}
protected

◆ settings

llhttp_settings_t http::Parser::settings
protected

◆ state

State http::Parser::state = DONE
protected

The documentation for this class was generated from the following file: