Webdar 1.0.0
Web user interface to libdar
Public Member Functions | List of all members
parser Class Reference

parser class is given a connection object and format the incoming byte flow in structured request objects More...

#include <parser.hpp>

Public Member Functions

 parser (std::unique_ptr< proto_connexion > &input, const std::shared_ptr< central_report > &log)
 
 parser (const parser &ref)=delete
 
 parser (parser &&ref) noexcept=delete
 
parseroperator= (const parser &ref)=delete
 
parseroperator= (parser &&ref) noexcept=delete
 
 ~parser ()
 destructor
 
proto_connexion::status get_status () const
 provides visibility on the connection status
 
bool get_next_request_uri (uri &val)
 
const requestget_request ()
 provides the next request
 
void send_answer (answer &ans)
 modify the answer to conform to RFC 1945 before sending it
 
void close ()
 closes the current connection
 

Detailed Description

parser class is given a connection object and format the incoming byte flow in structured request objects

Constructor & Destructor Documentation

◆ parser()

parser::parser ( std::unique_ptr< proto_connexion > &  input,
const std::shared_ptr< central_report > &  log 
)

constructor

Parameters
[in]inputis the proto_connexion to read data from
[in]logwhere to log messages
Note
the proto_connexion object passed to this becomes under the responsibility of this parser object and will be deleted when necessary. (where from the unique_ptr since C++11 webdar code update) The log object is out of the responsibility of this object however it must survive this parser object (where from the shared_ptr since C++11 webdar code update)

Member Function Documentation

◆ get_next_request_uri()

bool parser::get_next_request_uri ( uri val)

get the next request URI

Parameters
[out]valthe value of the next request uri
Returns
false if not enough data is available to provide the uri

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