#include <parser.hpp>
Classes | |
| class | error_category_t |
| class-specific error category More... | |
Public Types | |
| enum | error_value_t { ERROR_INVALID_SPDY_FRAME = 1, ERROR_INVALID_SPDY_VERSION, ERROR_DECOMPRESSION, ERROR_PROTOCOL_ERROR, ERROR_INTERNAL_SPDY_ERROR, ERROR_MISSING_HEADER_DATA } |
class-specific error code values | |
Public Member Functions | |
| parser () | |
| constructs a new parser object (default constructor) | |
| ~parser () | |
| destructor | |
| boost::tribool | parse (http_protocol_info &http_headers, boost::system::error_code &ec, decompressor_ptr &decompressor, const char *packet_ptr, boost::uint32_t &length_packet, boost::uint32_t current_stream_count) |
| const char * | get_spdy_data_content () |
| Get the pointer to the first character to the spdy data contect. | |
| const char * | get_spdy_read_pointer () |
| Get the pointer to the first character to the spdy data contect. | |
Static Public Member Functions | |
| static spdy_frame_type | get_spdy_frame_type (const char *ptr) |
| static bool | is_spdy_control_frame (const char *ptr) |
| static boost::uint32_t | get_control_frame_stream_id (const char *ptr) |
Protected Member Functions | |
| void | set_read_ptr (const char *ptr) |
| resets the read pointer | |
| bool | populate_frame (boost::system::error_code &ec, spdy_control_frame_info &frame, boost::uint32_t &length_packet, boost::uint32_t &stream_id, http_protocol_info &http_headers) |
| void | parse_header_payload (boost::system::error_code &ec, decompressor_ptr &decompressor, const spdy_control_frame_info &frame, http_protocol_info &http_headers, boost::uint32_t current_stream_count) |
| void | parse_spdy_data (boost::system::error_code &ec, const spdy_control_frame_info &frame, boost::uint32_t stream_id, http_protocol_info &http_info) |
| void | parse_spdy_settings_frame (boost::system::error_code &ec, const spdy_control_frame_info &frame) |
| void | parse_spdy_rst_stream (boost::system::error_code &ec, const spdy_control_frame_info &frame) |
| void | parse_spdy_ping_frame (boost::system::error_code &ec, const spdy_control_frame_info &frame) |
| void | parse_spdy_goaway_frame (boost::system::error_code &ec, const spdy_control_frame_info &frame) |
| void | parse_spdy_window_update_frame (boost::system::error_code &ec, const spdy_control_frame_info &frame) |
| boost::tribool | parse_spdy_frame (boost::system::error_code &ec, decompressor_ptr &decompressor, http_protocol_info &http_headers, boost::uint32_t &length_packet, boost::uint32_t current_stream_count) |
Static Protected Member Functions | |
| static void | create_error_category (void) |
| creates the unique parser error_category_t | |
| static error_category_t & | get_error_category (void) |
| returns an instance of parser::error_category_t | |
| static void | set_error (boost::system::error_code &ec, error_value_t ev) |
parser : parsers and reads the SPDY frames
Definition at line 36 of file parser.hpp.
| boost::uint32_t pion::spdy::parser::get_control_frame_stream_id | ( | const char * | ptr | ) | [static] |
get the stream id for the spdy control frame
Definition at line 133 of file spdy_parser.cpp.
References pion::algorithm::to_uint32().
| spdy_frame_type pion::spdy::parser::get_spdy_frame_type | ( | const char * | ptr | ) | [static] |
checks if the frame is spdy frame or not
Definition at line 107 of file spdy_parser.cpp.
| bool pion::spdy::parser::is_spdy_control_frame | ( | const char * | ptr | ) | [static] |
checks if the frame is spdy control frame or not
Definition at line 71 of file spdy_parser.cpp.
References pion::algorithm::to_uint16().
| boost::tribool pion::spdy::parser::parse | ( | http_protocol_info & | http_headers, | |
| boost::system::error_code & | ec, | |||
| decompressor_ptr & | decompressor, | |||
| const char * | packet_ptr, | |||
| boost::uint32_t & | length_packet, | |||
| boost::uint32_t | current_stream_count | |||
| ) |
parse a SPDY packet
Definition at line 57 of file spdy_parser.cpp.
References parse_spdy_frame(), and set_read_ptr().
| void pion::spdy::parser::parse_header_payload | ( | boost::system::error_code & | ec, | |
| decompressor_ptr & | decompressor, | |||
| const spdy_control_frame_info & | frame, | |||
| http_protocol_info & | http_headers, | |||
| boost::uint32_t | current_stream_count | |||
| ) | [protected] |
parses an the header payload for SPDY
Definition at line 348 of file spdy_parser.cpp.
References set_error(), pion::algorithm::to_uint16(), and pion::algorithm::to_uint32().
Referenced by parse_spdy_frame().
| void pion::spdy::parser::parse_spdy_data | ( | boost::system::error_code & | ec, | |
| const spdy_control_frame_info & | frame, | |||
| boost::uint32_t | stream_id, | |||
| http_protocol_info & | http_info | |||
| ) | [protected] |
parses the data for SPDY
Definition at line 466 of file spdy_parser.cpp.
Referenced by parse_spdy_frame().
| boost::tribool pion::spdy::parser::parse_spdy_frame | ( | boost::system::error_code & | ec, | |
| decompressor_ptr & | decompressor, | |||
| http_protocol_info & | http_headers, | |||
| boost::uint32_t & | length_packet, | |||
| boost::uint32_t | current_stream_count | |||
| ) | [protected] |
parse a SPDY frame (protected implementation)
There was an error; No need to further parse.
Definition at line 142 of file spdy_parser.cpp.
References parse_header_payload(), parse_spdy_data(), parse_spdy_goaway_frame(), parse_spdy_ping_frame(), parse_spdy_rst_stream(), parse_spdy_settings_frame(), parse_spdy_window_update_frame(), populate_frame(), and set_error().
Referenced by parse().
| void pion::spdy::parser::parse_spdy_goaway_frame | ( | boost::system::error_code & | ec, | |
| const spdy_control_frame_info & | frame | |||
| ) | [protected] |
parses an the GoAway Frame for SPDY
Definition at line 534 of file spdy_parser.cpp.
References set_error(), and pion::algorithm::to_uint32().
Referenced by parse_spdy_frame().
| void pion::spdy::parser::parse_spdy_ping_frame | ( | boost::system::error_code & | ec, | |
| const spdy_control_frame_info & | frame | |||
| ) | [protected] |
parses an the Ping Frame for SPDY
Definition at line 508 of file spdy_parser.cpp.
References pion::algorithm::to_uint32().
Referenced by parse_spdy_frame().
| void pion::spdy::parser::parse_spdy_rst_stream | ( | boost::system::error_code & | ec, | |
| const spdy_control_frame_info & | frame | |||
| ) | [protected] |
parses an the RST stream for SPDY
Definition at line 477 of file spdy_parser.cpp.
References pion::algorithm::to_uint32().
Referenced by parse_spdy_frame().
| void pion::spdy::parser::parse_spdy_settings_frame | ( | boost::system::error_code & | ec, | |
| const spdy_control_frame_info & | frame | |||
| ) | [protected] |
parses an the Settings Frame for SPDY
Definition at line 528 of file spdy_parser.cpp.
Referenced by parse_spdy_frame().
| void pion::spdy::parser::parse_spdy_window_update_frame | ( | boost::system::error_code & | ec, | |
| const spdy_control_frame_info & | frame | |||
| ) | [protected] |
parses an the WindowUpdate Frame for SPDY
Definition at line 574 of file spdy_parser.cpp.
Referenced by parse_spdy_frame().
| bool pion::spdy::parser::populate_frame | ( | boost::system::error_code & | ec, | |
| spdy_control_frame_info & | frame, | |||
| boost::uint32_t & | length_packet, | |||
| boost::uint32_t & | stream_id, | |||
| http_protocol_info & | http_headers | |||
| ) | [protected] |
populates the frame for every spdy packet Returns false if there was an error else returns true
Definition at line 264 of file spdy_parser.cpp.
References set_error(), pion::algorithm::to_uint16(), and pion::algorithm::to_uint32().
Referenced by parse_spdy_frame().
| static void pion::spdy::parser::set_error | ( | boost::system::error_code & | ec, | |
| error_value_t | ev | |||
| ) | [inline, static, protected] |
sets an error code
| ec | error code variable to define | |
| ev | error value to raise |
Definition at line 149 of file parser.hpp.
Referenced by parse_header_payload(), parse_spdy_frame(), parse_spdy_goaway_frame(), and populate_frame().
1.6.1