Fastcgipp::Protocol::BeginRequest Class Reference

Data structure used as the body for FastCGI records with a RecordType of BEGIN_REQUEST. More...

#include <protocol.hpp>

List of all members.

Public Member Functions

Role getRole () const
 Get the role field from the record body.
bool getKeepConn () const
 Get keep alive value from the record body.

Private Attributes

uint8_t roleB1
 Role value most significant byte.
uint8_t roleB0
 Role value least significant byte.
uint8_t flags
 Flag value.
uint8_t reserved [5]
 Reseved for future use and body padding.

Static Private Attributes

static const int keepConnBit = 1
 Flag bit representing the keep alive value.


Detailed Description

Data structure used as the body for FastCGI records with a RecordType of BEGIN_REQUEST.

This structure defines the body used in FastCGI BEGIN_REQUEST records. It can be casted from raw 8 byte blocks of data and received as is. A BEGIN_REQUEST record is received when the other side wished to make a new request.

Definition at line 240 of file protocol.hpp.


Member Function Documentation

bool Fastcgipp::Protocol::BeginRequest::getKeepConn (  )  const [inline]

Get keep alive value from the record body.

If this value is false, the socket should be closed on our side when the request is complete. If true, the other side will close the socket when done and potentially reuse the socket and multiplex other requests on it.

Returns:
Boolean value as to whether or not the connection is kept alive

Definition at line 257 of file protocol.hpp.

References flags, and keepConnBit.

Role Fastcgipp::Protocol::BeginRequest::getRole (  )  const [inline]

Get the role field from the record body.

Returns:
The expected Role that the request will play

Definition at line 247 of file protocol.hpp.

References Fastcgipp::Protocol::readBigEndian(), and roleB1.


Member Data Documentation

Flag value.

Definition at line 267 of file protocol.hpp.

Referenced by getKeepConn().

const int Fastcgipp::Protocol::BeginRequest::keepConnBit = 1 [static, private]

Flag bit representing the keep alive value.

Definition at line 260 of file protocol.hpp.

Referenced by getKeepConn().

Reseved for future use and body padding.

Definition at line 269 of file protocol.hpp.

Role value least significant byte.

Definition at line 265 of file protocol.hpp.

Role value most significant byte.

Definition at line 263 of file protocol.hpp.

Referenced by getRole().


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

Generated on Thu Dec 11 01:47:29 2008 for fastcgi++ by  doxygen 1.5.7.1