cheshirekow  v0.1.0
fcgi::Request Class Reference

An FCGI request object. More...

#include <cpp_fcgi/Request.h>

Public Member Functions

int accept ()
 accepts a new request More...
 
char ** envp ()
 return pointer to environment parameters More...
 
std::ostream & err ()
 return reference to the error stream More...
 
void finish ()
 frees memory from a serviced request More...
 
void free ()
 calls FCGX_Free to free hidden memory associated with the request object More...
 
const char * getParam (const char *name)
 return parameter from the environment More...
 
std::istream & in ()
 return reference to the input stream More...
 
int init (const Socket &sock, int flags=FCGI_FAIL_ACCEPT_ON_INTR)
 Initialize an FCGX_Request for use with accept_r. More...
 
std::ostream & out ()
 return reference to the output stream More...
 
 Request ()
 

Private Attributes

std::ostream m_err
 error stream More...
 
fcgi_streambuf m_errBuf
 std::streambuf for the error stream More...
 
std::istream m_in
 input stream More...
 
fcgi_streambuf m_inBuf
 std::streambuf for the input stream More...
 
std::ostream m_out
 output stream More...
 
fcgi_streambuf m_outBuf
 std::streambuf for the output stream More...
 
FCGX_Request m_req
 the actual request object More...
 

Detailed Description

An FCGI request object.

Definition at line 38 of file Request.h.

Constructor & Destructor Documentation

fcgi::Request::Request ( )

Member Function Documentation

int fcgi::Request::accept ( )

accepts a new request

Returns
result of FCGX_accept_r
char** fcgi::Request::envp ( )

return pointer to environment parameters

std::ostream& fcgi::Request::err ( )

return reference to the error stream

void fcgi::Request::finish ( )

frees memory from a serviced request

Note
After calling this method, most other methods will be invalid until accept() has been called again
void fcgi::Request::free ( )

calls FCGX_Free to free hidden memory associated with the request object

const char* fcgi::Request::getParam ( const char *  name)

return parameter from the environment

std::istream& fcgi::Request::in ( )

return reference to the input stream

int fcgi::Request::init ( const Socket sock,
int  flags = FCGI_FAIL_ACCEPT_ON_INTR 
)

Initialize an FCGX_Request for use with accept_r.

Parameters
sockthe socket connection to accept a request on
flagsfor now, only accepts FCGI_ACCEPT_ON_INTR
Returns
result of FCGX_InitRequest
Note
Most methods are not valid until accept() has been called successfully
std::ostream& fcgi::Request::out ( )

return reference to the output stream

Member Data Documentation

std::ostream fcgi::Request::m_err
private

error stream

Definition at line 49 of file Request.h.

fcgi_streambuf fcgi::Request::m_errBuf
private

std::streambuf for the error stream

Definition at line 45 of file Request.h.

std::istream fcgi::Request::m_in
private

input stream

Definition at line 47 of file Request.h.

fcgi_streambuf fcgi::Request::m_inBuf
private

std::streambuf for the input stream

Definition at line 43 of file Request.h.

std::ostream fcgi::Request::m_out
private

output stream

Definition at line 48 of file Request.h.

fcgi_streambuf fcgi::Request::m_outBuf
private

std::streambuf for the output stream

Definition at line 44 of file Request.h.

FCGX_Request fcgi::Request::m_req
private

the actual request object

Definition at line 41 of file Request.h.


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