fastcgi++
Public Member Functions | Private Attributes | Static Private Attributes
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 256 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 273 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 263 of file protocol.hpp.

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


Member Data Documentation

uint8_t Fastcgipp::Protocol::BeginRequest::flags
private

Flag value.

Definition at line 283 of file protocol.hpp.

Referenced by getKeepConn().

const int Fastcgipp::Protocol::BeginRequest::keepConnBit = 1
staticprivate

Flag bit representing the keep alive value.

Definition at line 276 of file protocol.hpp.

Referenced by getKeepConn().

uint8_t Fastcgipp::Protocol::BeginRequest::reserved[5]
private

Reseved for future use and body padding.

Definition at line 285 of file protocol.hpp.

uint8_t Fastcgipp::Protocol::BeginRequest::roleB0
private

Role value least significant byte.

Definition at line 281 of file protocol.hpp.

uint8_t Fastcgipp::Protocol::BeginRequest::roleB1
private

Role value most significant byte.

Definition at line 279 of file protocol.hpp.

Referenced by getRole().


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