Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
ros_http_video_streamer::request_parser Class Reference

Parser for incoming requests. More...

#include <request_parser.h>

List of all members.

Public Member Functions

template<typename InputIterator >
boost::tuple< boost::tribool,
InputIterator > 
parse (request &req, InputIterator begin, InputIterator end)
 request_parser ()
 Construct ready to parse the request method.
void reset ()
 Reset to initial parser state.

Private Types

enum  state {
  method_start, method, uri_start, uri,
  http_version_h, http_version_t_1, http_version_t_2, http_version_p,
  http_version_slash, http_version_major_start, http_version_major, http_version_minor_start,
  http_version_minor, expecting_newline_1, header_line_start, header_lws,
  header_name, space_before_header_value, header_value, expecting_newline_2,
  expecting_newline_3
}
 The current state of the parser. More...

Private Member Functions

boost::tribool consume (request &req, char input)
 Handle the next character of input.

Static Private Member Functions

static bool is_char (int c)
 Check if a byte is an HTTP character.
static bool is_ctl (int c)
 Check if a byte is an HTTP control character.
static bool is_digit (int c)
 Check if a byte is a digit.
static bool is_tspecial (int c)
 Check if a byte is defined as an HTTP tspecial character.

Private Attributes

enum
ros_http_video_streamer::request_parser::state 
state_

Detailed Description

Parser for incoming requests.

Definition at line 23 of file request_parser.h.


Member Enumeration Documentation

The current state of the parser.

Enumerator:
method_start 
method 
uri_start 
uri 
http_version_h 
http_version_t_1 
http_version_t_2 
http_version_p 
http_version_slash 
http_version_major_start 
http_version_major 
http_version_minor_start 
http_version_minor 
expecting_newline_1 
header_line_start 
header_lws 
header_name 
space_before_header_value 
header_value 
expecting_newline_2 
expecting_newline_3 

Definition at line 67 of file request_parser.h.


Constructor & Destructor Documentation

Construct ready to parse the request method.

Definition at line 17 of file request_parser.cpp.


Member Function Documentation

boost::tribool ros_http_video_streamer::request_parser::consume ( request req,
char  input 
) [private]

Handle the next character of input.

Definition at line 27 of file request_parser.cpp.

bool ros_http_video_streamer::request_parser::is_char ( int  c) [static, private]

Check if a byte is an HTTP character.

Definition at line 296 of file request_parser.cpp.

bool ros_http_video_streamer::request_parser::is_ctl ( int  c) [static, private]

Check if a byte is an HTTP control character.

Definition at line 301 of file request_parser.cpp.

bool ros_http_video_streamer::request_parser::is_digit ( int  c) [static, private]

Check if a byte is a digit.

Definition at line 320 of file request_parser.cpp.

bool ros_http_video_streamer::request_parser::is_tspecial ( int  c) [static, private]

Check if a byte is defined as an HTTP tspecial character.

Definition at line 306 of file request_parser.cpp.

template<typename InputIterator >
boost::tuple<boost::tribool, InputIterator> ros_http_video_streamer::request_parser::parse ( request req,
InputIterator  begin,
InputIterator  end 
) [inline]

Parse some data. The tribool return value is true when a complete request has been parsed, false if the data is invalid, indeterminate when more data is required. The InputIterator return value indicates how much of the input has been consumed.

Definition at line 37 of file request_parser.h.

Reset to initial parser state.

Definition at line 22 of file request_parser.cpp.


Member Data Documentation


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


ros_web_video
Author(s): Julius Kammer
autogenerated on Fri Aug 28 2015 12:38:36